/***************************************************************************
                            KSycoca.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 <ksycoca.h>
#include <qstring.h>
#include <qcstring.h>

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

class KSycocaJBridge : public KSycoca
{
public:
	KSycocaJBridge() : KSycoca() {}
	~KSycocaJBridge() {QtSupport::qtKeyDeleted(this);}
	KSycocaJBridge(bool arg1) : KSycoca(arg1) {}
	bool  protected_checkVersion(bool abortOnError) {
		return (bool ) KSycoca::checkVersion(abortOnError);
	}
	bool  protected_openDatabase(bool openDummyIfNotFound) {
		return (bool ) KSycoca::openDatabase(openDummyIfNotFound);
	}
	void protected_closeDatabase() {
		KSycoca::closeDatabase();
		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_KSycoca_newKSycoca__(JNIEnv *env, jobject obj)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KSycocaJBridge());
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KSycoca_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_KSycoca_finalize(env, obj);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSycoca_findEntry(JNIEnv *env, jobject obj, jint offset, jobject type)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((KSycoca*) QtSupport::getQt(env, obj))->findEntry((int) offset, (KSycocaType&) *(KSycocaType *) QtSupport::getQt(env, type)), "org.kde.qt.QDataStream");
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSycoca_findFactory(JNIEnv *env, jobject obj, jobject identifier)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((KSycoca*) QtSupport::getQt(env, obj))->findFactory((KSycocaFactoryId) *(KSycocaFactoryId *) QtSupport::getQt(env, identifier)), "org.kde.qt.QDataStream");
}

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

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

JNIEXPORT jint JNICALL
Java_org_kde_koala_KSycoca_timeStamp(JNIEnv *env, jobject obj)
{
	return (jint) ((KSycoca*) QtSupport::getQt(env, obj))->timeStamp();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KSycoca_addFactory(JNIEnv *env, jobject obj, jobject arg1)
{
	((KSycoca*) QtSupport::getQt(env, obj))->addFactory((KSycocaFactory*) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSycoca_isBuilding(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KSycoca*) QtSupport::getQt(env, obj))->isBuilding();
}

//JNIEXPORT  JNICALL
//Java_org_kde_koala_KSycoca_notifyDatabaseChanged(JNIEnv *env, jobject obj, jobjectArray arg1)
//{
//static QStringList * _qlist_arg1 = 0;
//	return () ((KSycoca*) QtSupport::getQt(env, obj))->notifyDatabaseChanged((QStringList&) * (QStringList *) QtSupport::toQStringList(env, arg1, &_qlist_arg1));
//}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSycoca_self(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KSycocaJBridge::self(), "org.kde.koala.KSycoca");
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSycoca_determineRelativePath(JNIEnv *env, jclass obj, jstring _fullpath, jstring _resource)
{
	QString  _qstring;
static QCString * _qstring__resource = 0;
static QString * _qstring__fullpath = 0;
	_qstring = KSycocaJBridge::determineRelativePath((QString&) * (QString *) QtSupport::toQString(env, _fullpath, &_qstring__fullpath), (char*) QtSupport::toCharString(env, _resource, &_qstring__resource));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSycoca_isChanged(JNIEnv *env, jclass obj, jstring type)
{
static QCString * _qstring_type = 0;
	return (jboolean) KSycocaJBridge::isChanged((char*) QtSupport::toCharString(env, type, &_qstring_type));
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KSycoca_newKSycoca__Z(JNIEnv *env, jobject obj, jboolean arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KSycocaJBridge((bool) arg1));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSycoca_checkVersion__Z(JNIEnv *env, jobject obj, jboolean abortOnError)
{
	return (jboolean) ((KSycocaJBridge*) QtSupport::getQt(env, obj))->protected_checkVersion((bool) abortOnError);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSycoca_checkVersion__(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KSycocaJBridge*) QtSupport::getQt(env, obj))->protected_checkVersion(true);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSycoca_openDatabase__Z(JNIEnv *env, jobject obj, jboolean openDummyIfNotFound)
{
	return (jboolean) ((KSycocaJBridge*) QtSupport::getQt(env, obj))->protected_openDatabase((bool) openDummyIfNotFound);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSycoca_openDatabase__(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KSycocaJBridge*) QtSupport::getQt(env, obj))->protected_openDatabase(true);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KSycoca_closeDatabase(JNIEnv *env, jobject obj)
{
	((KSycocaJBridge*) QtSupport::getQt(env, obj))->protected_closeDatabase();
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSycoca_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) ((KSycocaJBridge*) 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 jboolean JNICALL
Java_org_kde_koala_KSycoca_processDynamic(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) ((KSycocaJBridge*) QtSupport::getQt(env, obj))->processDynamic((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_KSycoca_interfaces(JNIEnv *env, jobject obj)
{
	QCStringList  _qlist;
	_qlist = ((KSycocaJBridge*) QtSupport::getQt(env, obj))->interfaces();
	return (jobject) KDESupport::arrayWithQCStringList(env, (QCStringList *) &_qlist);
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KSycoca_emitDCOPSignal(JNIEnv *env, jobject obj, jstring signal, jbyteArray data)
{
static QByteArray * _qbyteArray_data = 0;
static QCString * _qcstring_signal = 0;
	((KSycocaJBridge*) 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_KSycoca_connectDCOPSignal(JNIEnv *env, jobject obj, jstring sender, jstring senderObj, jstring signal, jstring slot, jboolean Volatile)
{
static QCString * _qcstring_slot = 0;
static QCString * _qcstring_signal = 0;
static QCString * _qcstring_senderObj = 0;
static QCString * _qcstring_sender = 0;
	return (jboolean) ((KSycocaJBridge*) 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, slot, &_qcstring_slot), (bool) Volatile);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSycoca_disconnectDCOPSignal(JNIEnv *env, jobject obj, jstring sender, jstring senderObj, jstring signal, jstring slot)
{
static QCString * _qcstring_slot = 0;
static QCString * _qcstring_signal = 0;
static QCString * _qcstring_senderObj = 0;
static QCString * _qcstring_sender = 0;
	return (jboolean) ((KSycocaJBridge*) 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, slot, &_qcstring_slot));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSycoca_hasObject(JNIEnv *env, jclass obj, jstring objId)
{
static QCString * _qcstring_objId = 0;
	return (jboolean) KSycocaJBridge::hasObject((QCString&) * (QCString *) QtSupport::toQCString(env, objId, &_qcstring_objId));
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSycoca_find(JNIEnv *env, jclass obj, jstring objId)
{
static QCString * _qcstring_objId = 0;
	return (jobject) QtSupport::objectForQtKey(env, (void *)KSycocaJBridge::find((QCString&) * (QCString *) QtSupport::toQCString(env, objId, &_qcstring_objId)), "org.kde.koala.DCOPObjectInterface");
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSycoca_objectName(JNIEnv *env, jclass obj, jobject _obj)
{
	QCString  _qcstring;
	_qcstring = KSycocaJBridge::objectName((QObject*) QtSupport::getQt(env, _obj));
	return QtSupport::fromQCString(env, &_qcstring);
}


