/***************************************************************************
                            QMimeSourceFactory.cpp -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, 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 <qmime.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <qtjava/QMimeSourceFactory.h>

class QMimeSourceFactoryJBridge : public QMimeSourceFactory
{
public:
	QMimeSourceFactoryJBridge() : QMimeSourceFactory() {}
	~QMimeSourceFactoryJBridge() {QtSupport::qtKeyDeleted(this);}
};


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

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

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QMimeSourceFactory_data__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring abs_name)
{
static QString * _qstring_abs_name = 0;
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->data((QString&) * (QString *) QtSupport::toQString(env, abs_name, &_qstring_abs_name)), "org.kde.qt.QMimeSourceInterface");
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QMimeSourceFactory_makeAbsolute(JNIEnv *env, jobject obj, jstring abs_or_rel_name, jstring context)
{
	QString  _qstring;
static QString * _qstring_context = 0;
static QString * _qstring_abs_or_rel_name = 0;
	_qstring = ((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->makeAbsolute((QString&) * (QString *) QtSupport::toQString(env, abs_or_rel_name, &_qstring_abs_or_rel_name), (QString&) * (QString *) QtSupport::toQString(env, context, &_qstring_context));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QMimeSourceFactory_data__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring abs_or_rel_name, jstring context)
{
static QString * _qstring_context = 0;
static QString * _qstring_abs_or_rel_name = 0;
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->data((QString&) * (QString *) QtSupport::toQString(env, abs_or_rel_name, &_qstring_abs_or_rel_name), (QString&) * (QString *) QtSupport::toQString(env, context, &_qstring_context)), "org.kde.qt.QMimeSourceInterface");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_setText(JNIEnv *env, jobject obj, jstring abs_name, jstring text)
{
static QString * _qstring_text = 0;
static QString * _qstring_abs_name = 0;
	((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->setText((QString&) * (QString *) QtSupport::toQString(env, abs_name, &_qstring_abs_name), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_setImage(JNIEnv *env, jobject obj, jstring abs_name, jobject im)
{
static QString * _qstring_abs_name = 0;
	((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->setImage((QString&) * (QString *) QtSupport::toQString(env, abs_name, &_qstring_abs_name), (QImage&) *(QImage *) QtSupport::getQt(env, im));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_setPixmap(JNIEnv *env, jobject obj, jstring abs_name, jobject pm)
{
static QString * _qstring_abs_name = 0;
	((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->setPixmap((QString&) * (QString *) QtSupport::toQString(env, abs_name, &_qstring_abs_name), (QPixmap&) *(QPixmap *) QtSupport::getQt(env, pm));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_setData(JNIEnv *env, jobject obj, jstring abs_name, jobject data)
{
static QString * _qstring_abs_name = 0;
	((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->setData((QString&) * (QString *) QtSupport::toQString(env, abs_name, &_qstring_abs_name), QtSupport::mimeSource(env, data));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_setFilePath(JNIEnv *env, jobject obj, jobjectArray arg1)
{
static QStringList * _qlist_arg1 = 0;
	((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->setFilePath((QStringList&) * (QStringList *) QtSupport::toQStringList(env, arg1, &_qlist_arg1));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QMimeSourceFactory_filePath(JNIEnv *env, jobject obj)
{
	QStringList  _qlist;
	_qlist = ((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->filePath();
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList *) &_qlist);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_addFilePath(JNIEnv *env, jobject obj, jstring arg1)
{
static QString * _qstring_arg1 = 0;
	((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->addFilePath((QString&) * (QString *) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_setExtensionType(JNIEnv *env, jobject obj, jstring ext, jstring mimetype)
{
static QCString * _qstring_mimetype = 0;
static QString * _qstring_ext = 0;
	((QMimeSourceFactoryJBridge*) QtSupport::getQt(env, obj))->setExtensionType((QString&) * (QString *) QtSupport::toQString(env, ext, &_qstring_ext), (char*) QtSupport::toCharString(env, mimetype, &_qstring_mimetype));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QMimeSourceFactory_defaultFactory(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)QMimeSourceFactoryJBridge::defaultFactory(), "org.kde.qt.QMimeSourceFactory");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_setDefaultFactory(JNIEnv *env, jclass obj, jobject arg1)
{
	QMimeSourceFactoryJBridge::setDefaultFactory((QMimeSourceFactory*) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QMimeSourceFactory_takeDefaultFactory(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)QMimeSourceFactoryJBridge::takeDefaultFactory(), "org.kde.qt.QMimeSourceFactory");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_addFactory(JNIEnv *env, jclass obj, jobject f)
{
	QMimeSourceFactoryJBridge::addFactory((QMimeSourceFactory*) QtSupport::getQt(env, f));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMimeSourceFactory_removeFactory(JNIEnv *env, jclass obj, jobject f)
{
	QMimeSourceFactoryJBridge::removeFactory((QMimeSourceFactory*) QtSupport::getQt(env, f));
	return;
}

