/***************************************************************************
                            DCOPClient.cpp -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <dcopclient.h>
#include <qstring.h>
#include <qcstring.h>

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

class DCOPClientJBridge : public DCOPClient
{
public:
	DCOPClientJBridge() : DCOPClient() {}
	~DCOPClientJBridge() {QtSupport::qtKeyDeleted(this);}
	void protected_processSocketData(int socknum) {
		DCOPClient::processSocketData(socknum);
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "childEvent", arg1, "org.kde.qt.QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "customEvent", arg1, "org.kde.qt.QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "timerEvent", arg1, "org.kde.qt.QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
};


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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_DCOPClient_finalize(env, obj);
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_attach(JNIEnv *env, jobject obj)
{
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->attach();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_bindToApp(JNIEnv *env, jobject obj)
{
	((DCOPClient*) QtSupport::getQt(env, obj))->bindToApp();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_detach(JNIEnv *env, jobject obj)
{
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->detach();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_isAttached(JNIEnv *env, jobject obj)
{
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->isAttached();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_isAttachedToForeignServer(JNIEnv *env, jobject obj)
{
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->isAttachedToForeignServer();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_acceptCalls(JNIEnv *env, jobject obj)
{
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->acceptCalls();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_setAcceptCalls(JNIEnv *env, jobject obj, jboolean b)
{
	((DCOPClient*) QtSupport::getQt(env, obj))->setAcceptCalls((bool) b);
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_registerAs(JNIEnv *env, jobject obj, jstring appId, jboolean addPID)
{
	QCString  _qcstring;
static QCString * _qcstring_appId = 0;
	_qcstring = ((DCOPClient*) QtSupport::getQt(env, obj))->registerAs((QCString&) * (QCString *) QtSupport::toQCString(env, appId, &_qcstring_appId), (bool) addPID);
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_isRegistered(JNIEnv *env, jobject obj)
{
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->isRegistered();
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_appId(JNIEnv *env, jobject obj)
{
	QCString  _qcstring;
	_qcstring = ((DCOPClient*) QtSupport::getQt(env, obj))->appId();
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_DCOPClient_socket(JNIEnv *env, jobject obj)
{
	return (jint) ((DCOPClient*) QtSupport::getQt(env, obj))->socket();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_suspend(JNIEnv *env, jobject obj)
{
	((DCOPClient*) QtSupport::getQt(env, obj))->suspend();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_resume(JNIEnv *env, jobject obj)
{
	((DCOPClient*) QtSupport::getQt(env, obj))->resume();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_send__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2_3B(JNIEnv *env, jobject obj, jstring remApp, jstring remObj, jstring remFun, jbyteArray data)
{
static QByteArray * _qbyteArray_data = 0;
static QCString * _qcstring_remFun = 0;
static QCString * _qcstring_remObj = 0;
static QCString * _qcstring_remApp = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->send((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp), (QCString&) * (QCString *) QtSupport::toQCString(env, remObj, &_qcstring_remObj), (QCString&) * (QCString *) QtSupport::toQCString(env, remFun, &_qcstring_remFun), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_send__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring remApp, jstring remObj, jstring remFun, jstring data)
{
static QString * _qstring_data = 0;
static QCString * _qcstring_remFun = 0;
static QCString * _qcstring_remObj = 0;
static QCString * _qcstring_remApp = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->send((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp), (QCString&) * (QCString *) QtSupport::toQCString(env, remObj, &_qcstring_remObj), (QCString&) * (QCString *) QtSupport::toQCString(env, remFun, &_qcstring_remFun), (QString&) * (QString *) QtSupport::toQString(env, data, &_qstring_data));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_call__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2_3BLjava_lang_String_2_3BZ(JNIEnv *env, jobject obj, jstring remApp, jstring remObj, jstring remFun, jbyteArray data, jstring replyType, jbyteArray replyData, jboolean useEventLoop)
{
static QByteArray * _qbyteArray_replyData = 0;
static QCString * _qcstring_replyType = 0;
static QByteArray * _qbyteArray_data = 0;
static QCString * _qcstring_remFun = 0;
static QCString * _qcstring_remObj = 0;
static QCString * _qcstring_remApp = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->call((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp), (QCString&) * (QCString *) QtSupport::toQCString(env, remObj, &_qcstring_remObj), (QCString&) * (QCString *) QtSupport::toQCString(env, remFun, &_qcstring_remFun), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data), (QCString&) * (QCString *) QtSupport::toQCString(env, replyType, &_qcstring_replyType), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, replyData, &_qbyteArray_replyData), (bool) useEventLoop);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_call__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2_3BLjava_lang_String_2_3B(JNIEnv *env, jobject obj, jstring remApp, jstring remObj, jstring remFun, jbyteArray data, jstring replyType, jbyteArray replyData)
{
static QByteArray * _qbyteArray_replyData = 0;
static QCString * _qcstring_replyType = 0;
static QByteArray * _qbyteArray_data = 0;
static QCString * _qcstring_remFun = 0;
static QCString * _qcstring_remObj = 0;
static QCString * _qcstring_remApp = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->call((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp), (QCString&) * (QCString *) QtSupport::toQCString(env, remObj, &_qcstring_remObj), (QCString&) * (QCString *) QtSupport::toQCString(env, remFun, &_qcstring_remFun), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data), (QCString&) * (QCString *) QtSupport::toQCString(env, replyType, &_qcstring_replyType), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, replyData, &_qbyteArray_replyData), false);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_findObject__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2_3BLjava_lang_String_2Ljava_lang_String_2Z(JNIEnv *env, jobject obj, jstring remApp, jstring remObj, jstring remFun, jbyteArray data, jstring foundApp, jstring foundObj, jboolean useEventLoop)
{
static QCString * _qcstring_foundObj = 0;
static QCString * _qcstring_foundApp = 0;
static QByteArray * _qbyteArray_data = 0;
static QCString * _qcstring_remFun = 0;
static QCString * _qcstring_remObj = 0;
static QCString * _qcstring_remApp = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->findObject((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp), (QCString&) * (QCString *) QtSupport::toQCString(env, remObj, &_qcstring_remObj), (QCString&) * (QCString *) QtSupport::toQCString(env, remFun, &_qcstring_remFun), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data), (QCString&) * (QCString *) QtSupport::toQCString(env, foundApp, &_qcstring_foundApp), (QCString&) * (QCString *) QtSupport::toQCString(env, foundObj, &_qcstring_foundObj), (bool) useEventLoop);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_findObject__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2_3BLjava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring remApp, jstring remObj, jstring remFun, jbyteArray data, jstring foundApp, jstring foundObj)
{
static QCString * _qcstring_foundObj = 0;
static QCString * _qcstring_foundApp = 0;
static QByteArray * _qbyteArray_data = 0;
static QCString * _qcstring_remFun = 0;
static QCString * _qcstring_remObj = 0;
static QCString * _qcstring_remApp = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->findObject((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp), (QCString&) * (QCString *) QtSupport::toQCString(env, remObj, &_qcstring_remObj), (QCString&) * (QCString *) QtSupport::toQCString(env, remFun, &_qcstring_remFun), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data), (QCString&) * (QCString *) QtSupport::toQCString(env, foundApp, &_qcstring_foundApp), (QCString&) * (QCString *) QtSupport::toQCString(env, foundObj, &_qcstring_foundObj), false);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_emitDCOPSignal__Ljava_lang_String_2Ljava_lang_String_2_3B(JNIEnv *env, jobject obj, jstring object, jstring signal, jbyteArray data)
{
static QByteArray * _qbyteArray_data = 0;
static QCString * _qcstring_signal = 0;
static QCString * _qcstring_object = 0;
	((DCOPClient*) QtSupport::getQt(env, obj))->emitDCOPSignal((QCString&) * (QCString *) QtSupport::toQCString(env, object, &_qcstring_object), (QCString&) * (QCString *) QtSupport::toQCString(env, signal, &_qcstring_signal), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_emitDCOPSignal__Ljava_lang_String_2_3B(JNIEnv *env, jobject obj, jstring signal, jbyteArray data)
{
static QByteArray * _qbyteArray_data = 0;
static QCString * _qcstring_signal = 0;
	((DCOPClient*) QtSupport::getQt(env, obj))->emitDCOPSignal((QCString&) * (QCString *) QtSupport::toQCString(env, signal, &_qcstring_signal), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_connectDCOPSignal__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv *env, jobject obj, jstring sender, jstring senderObj, jstring signal, jstring receiverObj, jstring slot, jboolean Volatile)
{
static QCString * _qcstring_slot = 0;
static QCString * _qcstring_receiverObj = 0;
static QCString * _qcstring_signal = 0;
static QCString * _qcstring_senderObj = 0;
static QCString * _qcstring_sender = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->connectDCOPSignal((QCString&) * (QCString *) QtSupport::toQCString(env, sender, &_qcstring_sender), (QCString&) * (QCString *) QtSupport::toQCString(env, senderObj, &_qcstring_senderObj), (QCString&) * (QCString *) QtSupport::toQCString(env, signal, &_qcstring_signal), (QCString&) * (QCString *) QtSupport::toQCString(env, receiverObj, &_qcstring_receiverObj), (QCString&) * (QCString *) QtSupport::toQCString(env, slot, &_qcstring_slot), (bool) Volatile);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_connectDCOPSignal__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv *env, jobject obj, jstring sender, jstring signal, jstring receiverObj, jstring slot, jboolean Volatile)
{
static QCString * _qcstring_slot = 0;
static QCString * _qcstring_receiverObj = 0;
static QCString * _qcstring_signal = 0;
static QCString * _qcstring_sender = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->connectDCOPSignal((QCString&) * (QCString *) QtSupport::toQCString(env, sender, &_qcstring_sender), (QCString&) * (QCString *) QtSupport::toQCString(env, signal, &_qcstring_signal), (QCString&) * (QCString *) QtSupport::toQCString(env, receiverObj, &_qcstring_receiverObj), (QCString&) * (QCString *) QtSupport::toQCString(env, slot, &_qcstring_slot), (bool) Volatile);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_disconnectDCOPSignal__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring sender, jstring senderObj, jstring signal, jstring receiverObj, jstring slot)
{
static QCString * _qcstring_slot = 0;
static QCString * _qcstring_receiverObj = 0;
static QCString * _qcstring_signal = 0;
static QCString * _qcstring_senderObj = 0;
static QCString * _qcstring_sender = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->disconnectDCOPSignal((QCString&) * (QCString *) QtSupport::toQCString(env, sender, &_qcstring_sender), (QCString&) * (QCString *) QtSupport::toQCString(env, senderObj, &_qcstring_senderObj), (QCString&) * (QCString *) QtSupport::toQCString(env, signal, &_qcstring_signal), (QCString&) * (QCString *) QtSupport::toQCString(env, receiverObj, &_qcstring_receiverObj), (QCString&) * (QCString *) QtSupport::toQCString(env, slot, &_qcstring_slot));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_disconnectDCOPSignal__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring sender, jstring signal, jstring receiverObj, jstring slot)
{
static QCString * _qcstring_slot = 0;
static QCString * _qcstring_receiverObj = 0;
static QCString * _qcstring_signal = 0;
static QCString * _qcstring_sender = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->disconnectDCOPSignal((QCString&) * (QCString *) QtSupport::toQCString(env, sender, &_qcstring_sender), (QCString&) * (QCString *) QtSupport::toQCString(env, signal, &_qcstring_signal), (QCString&) * (QCString *) QtSupport::toQCString(env, receiverObj, &_qcstring_receiverObj), (QCString&) * (QCString *) QtSupport::toQCString(env, slot, &_qcstring_slot));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_process(JNIEnv *env, jobject obj, jstring fun, jbyteArray data, jstring replyType, jbyteArray replyData)
{
static QByteArray * _qbyteArray_replyData = 0;
static QCString * _qcstring_replyType = 0;
static QByteArray * _qbyteArray_data = 0;
static QCString * _qcstring_fun = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->process((QCString&) * (QCString *) QtSupport::toQCString(env, fun, &_qcstring_fun), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data), (QCString&) * (QCString *) QtSupport::toQCString(env, replyType, &_qcstring_replyType), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, replyData, &_qbyteArray_replyData));
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_DCOPClient_beginTransaction(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((DCOPClient*) QtSupport::getQt(env, obj))->beginTransaction(), "org.kde.koala.DCOPClientTransaction");
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_endTransaction(JNIEnv *env, jobject obj, jobject arg1, jstring replyType, jbyteArray replyData)
{
static QByteArray * _qbyteArray_replyData = 0;
static QCString * _qcstring_replyType = 0;
	((DCOPClient*) QtSupport::getQt(env, obj))->endTransaction((DCOPClientTransaction*) QtSupport::getQt(env, arg1), (QCString&) * (QCString *) QtSupport::toQCString(env, replyType, &_qcstring_replyType), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, replyData, &_qbyteArray_replyData));
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_DCOPClient_transactionId(JNIEnv *env, jobject obj)
{
	return (jint) ((DCOPClient*) QtSupport::getQt(env, obj))->transactionId();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_DCOPClient_isApplicationRegistered(JNIEnv *env, jobject obj, jstring remApp)
{
static QCString * _qcstring_remApp = 0;
	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->isApplicationRegistered((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp));
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_DCOPClient_registeredApplications(JNIEnv *env, jobject obj)
{
	QCStringList  _qlist;
	_qlist = ((DCOPClient*) QtSupport::getQt(env, obj))->registeredApplications();
	return (jobject) KDESupport::arrayWithQCStringList(env, (QCStringList *) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_DCOPClient_remoteObjects(JNIEnv *env, jobject obj, jstring remApp, jintArray ok)
{
	QCStringList  _qlist;
static QCString * _qcstring_remApp = 0;
	_qlist = ((DCOPClient*) QtSupport::getQt(env, obj))->remoteObjects((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp),  (bool*) QtSupport::toIntPtr(env, ok));
	return (jobject) KDESupport::arrayWithQCStringList(env, (QCStringList *) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_DCOPClient_remoteInterfaces(JNIEnv *env, jobject obj, jstring remApp, jstring remObj, jintArray ok)
{
	QCStringList  _qlist;
static QCString * _qcstring_remObj = 0;
static QCString * _qcstring_remApp = 0;
	_qlist = ((DCOPClient*) QtSupport::getQt(env, obj))->remoteInterfaces((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp), (QCString&) * (QCString *) QtSupport::toQCString(env, remObj, &_qcstring_remObj),  (bool*) QtSupport::toIntPtr(env, ok));
	return (jobject) KDESupport::arrayWithQCStringList(env, (QCStringList *) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_DCOPClient_remoteFunctions(JNIEnv *env, jobject obj, jstring remApp, jstring remObj, jintArray ok)
{
	QCStringList  _qlist;
static QCString * _qcstring_remObj = 0;
static QCString * _qcstring_remApp = 0;
	_qlist = ((DCOPClient*) QtSupport::getQt(env, obj))->remoteFunctions((QCString&) * (QCString *) QtSupport::toQCString(env, remApp, &_qcstring_remApp), (QCString&) * (QCString *) QtSupport::toQCString(env, remObj, &_qcstring_remObj),  (bool*) QtSupport::toIntPtr(env, ok));
	return (jobject) KDESupport::arrayWithQCStringList(env, (QCStringList *) &_qlist);
}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_koala_DCOPClient_receive(JNIEnv *env, jobject obj, jstring app, jstring obj, jstring fun, jbyteArray data, jstring replyType, jbyteArray replyData)
//{
//static QByteArray * _qbyteArray_replyData = 0;
//static QCString * _qcstring_replyType = 0;
//static QByteArray * _qbyteArray_data = 0;
//static QCString * _qcstring_fun = 0;
//static QCString * _qcstring_obj = 0;
//static QCString * _qcstring_app = 0;
//	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->receive((QCString&) * (QCString *) QtSupport::toQCString(env, app, &_qcstring_app), (QCString&) * (QCString *) QtSupport::toQCString(env, obj, &_qcstring_obj), (QCString&) * (QCString *) QtSupport::toQCString(env, fun, &_qcstring_fun), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data), (QCString&) * (QCString *) QtSupport::toQCString(env, replyType, &_qcstring_replyType), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, replyData, &_qbyteArray_replyData));
//}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_koala_DCOPClient_find(JNIEnv *env, jobject obj, jstring app, jstring obj, jstring fun, jbyteArray data, jstring replyType, jbyteArray replyData)
//{
//static QByteArray * _qbyteArray_replyData = 0;
//static QCString * _qcstring_replyType = 0;
//static QByteArray * _qbyteArray_data = 0;
//static QCString * _qcstring_fun = 0;
//static QCString * _qcstring_obj = 0;
//static QCString * _qcstring_app = 0;
//	return (jboolean) ((DCOPClient*) QtSupport::getQt(env, obj))->find((QCString&) * (QCString *) QtSupport::toQCString(env, app, &_qcstring_app), (QCString&) * (QCString *) QtSupport::toQCString(env, obj, &_qcstring_obj), (QCString&) * (QCString *) QtSupport::toQCString(env, fun, &_qcstring_fun), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data), (QCString&) * (QCString *) QtSupport::toQCString(env, replyType, &_qcstring_replyType), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, replyData, &_qbyteArray_replyData));
//}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_senderId(JNIEnv *env, jobject obj)
{
	QCString  _qcstring;
	_qcstring = ((DCOPClient*) QtSupport::getQt(env, obj))->senderId();
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_setDefaultObject(JNIEnv *env, jobject obj, jstring objId)
{
static QCString * _qcstring_objId = 0;
	((DCOPClient*) QtSupport::getQt(env, obj))->setDefaultObject((QCString&) * (QCString *) QtSupport::toQCString(env, objId, &_qcstring_objId));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_defaultObject(JNIEnv *env, jobject obj)
{
	QCString  _qcstring;
	_qcstring = ((DCOPClient*) QtSupport::getQt(env, obj))->defaultObject();
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_setNotifications(JNIEnv *env, jobject obj, jboolean enabled)
{
	((DCOPClient*) QtSupport::getQt(env, obj))->setNotifications((bool) enabled);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_setDaemonMode(JNIEnv *env, jobject obj, jboolean daemonMode)
{
	((DCOPClient*) QtSupport::getQt(env, obj))->setDaemonMode((bool) daemonMode);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_setServerAddress(JNIEnv *env, jclass obj, jstring addr)
{
static QCString * _qcstring_addr = 0;
	DCOPClientJBridge::setServerAddress((QCString&) * (QCString *) QtSupport::toQCString(env, addr, &_qcstring_addr));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_normalizeFunctionSignature(JNIEnv *env, jclass obj, jstring fun)
{
	QCString  _qcstring;
static QCString * _qcstring_fun = 0;
	_qcstring = DCOPClientJBridge::normalizeFunctionSignature((QCString&) * (QCString *) QtSupport::toQCString(env, fun, &_qcstring_fun));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_DCOPClient_mainClient(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)DCOPClientJBridge::mainClient(), "org.kde.koala.DCOPClient");
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_setMainClient(JNIEnv *env, jclass obj, jobject arg1)
{
	DCOPClientJBridge::setMainClient((DCOPClient*) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_emergencyClose(JNIEnv *env, jclass obj)
{
	DCOPClientJBridge::emergencyClose();
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_postMortemSender(JNIEnv *env, jclass obj)
{
	 const char * _qcstring;
	_qcstring = (const char *)DCOPClientJBridge::postMortemSender();
	return QtSupport::fromCharString(env, (char *) _qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_postMortemObject(JNIEnv *env, jclass obj)
{
	 const char * _qcstring;
	_qcstring = (const char *)DCOPClientJBridge::postMortemObject();
	return QtSupport::fromCharString(env, (char *) _qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_postMortemFunction(JNIEnv *env, jclass obj)
{
	 const char * _qcstring;
	_qcstring = (const char *)DCOPClientJBridge::postMortemFunction();
	return QtSupport::fromCharString(env, (char *) _qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_dcopServerFile(JNIEnv *env, jclass obj, jstring hostname)
{
	QCString  _qcstring;
static QCString * _qcstring_hostname = 0;
	_qcstring = DCOPClientJBridge::dcopServerFile((QCString&) * (QCString *) QtSupport::toQCString(env, hostname, &_qcstring_hostname));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_DCOPClient_dcopServerFileOld(JNIEnv *env, jclass obj, jstring hostname)
{
	QCString  _qcstring;
static QCString * _qcstring_hostname = 0;
	_qcstring = DCOPClientJBridge::dcopServerFileOld((QCString&) * (QCString *) QtSupport::toQCString(env, hostname, &_qcstring_hostname));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_DCOPClient_processSocketData(JNIEnv *env, jobject obj, jint socknum)
{
	((DCOPClientJBridge*) QtSupport::getQt(env, obj))->protected_processSocketData((int) socknum);
	return;
}

