/***************************************************************************
                            KExecMimeType.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/KExecMimeType.h>

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


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

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

