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

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

class KFolderTypeJBridge : public KFolderType
{
public:
	KFolderTypeJBridge(KDesktopFile* config) : KFolderType(config) {}
	KFolderTypeJBridge(QDataStream& _str, int offset) : KFolderType(_str, offset) {}
};


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

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

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KFolderType_icon__Ljava_lang_String_2Z(JNIEnv *env, jobject obj, jstring _url, jboolean _is_local)
{
	QString  _qstring;
static QString * _qstring__url = 0;
	_qstring = ((KFolderType*) QtSupport::getQt(env, obj))->icon((QString&) * (QString *) QtSupport::toQString(env, _url, &_qstring__url), (bool) _is_local);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KFolderType_icon__Lorg_kde_koala_KURL_2Z(JNIEnv *env, jobject obj, jobject _url, jboolean _is_local)
{
	QString  _qstring;
	_qstring = ((KFolderType*) QtSupport::getQt(env, obj))->icon((KURL&) *(KURL *) QtSupport::getQt(env, _url), (bool) _is_local);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KFolderType_comment__Ljava_lang_String_2Z(JNIEnv *env, jobject obj, jstring _url, jboolean _is_local)
{
	QString  _qstring;
static QString * _qstring__url = 0;
	_qstring = ((KFolderType*) QtSupport::getQt(env, obj))->comment((QString&) * (QString *) QtSupport::toQString(env, _url, &_qstring__url), (bool) _is_local);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KFolderType_comment__Lorg_kde_koala_KURL_2Z(JNIEnv *env, jobject obj, jobject _url, jboolean _is_local)
{
	QString  _qstring;
	_qstring = ((KFolderType*) QtSupport::getQt(env, obj))->comment((KURL&) *(KURL *) QtSupport::getQt(env, _url), (bool) _is_local);
	return QtSupport::fromQString(env, &_qstring);
}

