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

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

class KProtocolInfoJBridge : public KProtocolInfo
{
public:
	KProtocolInfoJBridge(const QString& path) : KProtocolInfo(path) {}
	KProtocolInfoJBridge(QDataStream& _str, int offset) : KProtocolInfo(_str, offset) {}
	~KProtocolInfoJBridge() {QtSupport::qtKeyDeleted(this);}
};


JNIEXPORT void JNICALL
Java_org_kde_koala_KProtocolInfo_newKProtocolInfo__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring path)
{
static QString * _qstring_path = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KProtocolInfoJBridge((QString&) * (QString *) QtSupport::toQString(env, path, &_qstring_path)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_isValid(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KProtocolInfo*) QtSupport::getQt(env, obj))->isValid();
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KProtocolInfo_newKProtocolInfo__Lorg_kde_qt_QDataStream_2I(JNIEnv *env, jobject obj, jobject _str, jint offset)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KProtocolInfoJBridge((QDataStream&) *(QDataStream *) QtSupport::getQt(env, _str), (int) offset));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KProtocolInfo_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_KProtocolInfo_finalize(env, obj);
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KProtocolInfo_load(JNIEnv *env, jobject obj, jobject arg1)
{
	((KProtocolInfo*) QtSupport::getQt(env, obj))->load((QDataStream&) *(QDataStream *) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KProtocolInfo_save(JNIEnv *env, jobject obj, jobject arg1)
{
	((KProtocolInfo*) QtSupport::getQt(env, obj))->save((QDataStream&) *(QDataStream *) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KProtocolInfo_protocols(JNIEnv *env, jclass obj)
{
	QStringList  _qlist;
	_qlist = KProtocolInfoJBridge::protocols();
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList *) &_qlist);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_isKnownProtocol__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::isKnownProtocol((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolInfo_exec(JNIEnv *env, jclass obj, jstring protocol)
{
	QString  _qstring;
static QString * _qstring_protocol = 0;
	_qstring = KProtocolInfoJBridge::exec((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolInfo_inputType__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jint) KProtocolInfoJBridge::inputType((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolInfo_outputType__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jint) KProtocolInfoJBridge::outputType((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KProtocolInfo_listing__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	QStringList  _qlist;
	_qlist = KProtocolInfoJBridge::listing((KURL&) *(KURL *) QtSupport::getQt(env, url));
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList *) &_qlist);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_isSourceProtocol__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::isSourceProtocol((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_isHelperProtocol__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::isHelperProtocol((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_isFilterProtocol__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::isFilterProtocol((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsListing__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::supportsListing((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsReading__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::supportsReading((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsWriting__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::supportsWriting((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsMakeDir__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::supportsMakeDir((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsDeleting__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::supportsDeleting((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsLinking__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::supportsLinking((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsMoving__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::supportsMoving((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_canCopyFromFile__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::canCopyFromFile((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_canCopyToFile__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	return (jboolean) KProtocolInfoJBridge::canCopyToFile((KURL&) *(KURL *) QtSupport::getQt(env, url));
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolInfo_defaultMimetype__Lorg_kde_koala_KURL_2(JNIEnv *env, jclass obj, jobject url)
{
	QString  _qstring;
	_qstring = KProtocolInfoJBridge::defaultMimetype((KURL&) *(KURL *) QtSupport::getQt(env, url));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolInfo_icon(JNIEnv *env, jclass obj, jstring protocol)
{
	QString  _qstring;
static QString * _qstring_protocol = 0;
	_qstring = KProtocolInfoJBridge::icon((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolInfo_config(JNIEnv *env, jclass obj, jstring protocol)
{
	QString  _qstring;
static QString * _qstring_protocol = 0;
	_qstring = KProtocolInfoJBridge::config((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolInfo_maxSlaves(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jint) KProtocolInfoJBridge::maxSlaves((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_determineMimetypeFromExtension(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::determineMimetypeFromExtension((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolInfo_inputType__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jint) KProtocolInfoJBridge::inputType((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolInfo_outputType__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jint) KProtocolInfoJBridge::outputType((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KProtocolInfo_listing__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
	QStringList  _qlist;
static QString * _qstring_protocol = 0;
	_qlist = KProtocolInfoJBridge::listing((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList *) &_qlist);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_isSourceProtocol__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::isSourceProtocol((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_isHelperProtocol__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::isHelperProtocol((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_isFilterProtocol__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::isFilterProtocol((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_isKnownProtocol__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::isKnownProtocol((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsListing__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::supportsListing((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsReading__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::supportsReading((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsWriting__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::supportsWriting((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsMakeDir__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::supportsMakeDir((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsDeleting__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::supportsDeleting((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsLinking__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::supportsLinking((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_supportsMoving__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::supportsMoving((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_canCopyFromFile__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::canCopyFromFile((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolInfo_canCopyToFile__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
static QString * _qstring_protocol = 0;
	return (jboolean) KProtocolInfoJBridge::canCopyToFile((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolInfo_defaultMimetype__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring protocol)
{
	QString  _qstring;
static QString * _qstring_protocol = 0;
	_qstring = KProtocolInfoJBridge::defaultMimetype((QString&) * (QString *) QtSupport::toQString(env, protocol, &_qstring_protocol));
	return QtSupport::fromQString(env, &_qstring);
}

