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

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

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_quotedPrintableEncode___3BZ(JNIEnv *env, jclass obj, jbyteArray in, jboolean useCRLF)
{
	QCString  _qcstring;
static QByteArray * _qbyteArray_in = 0;
	_qcstring = KCodecs::quotedPrintableEncode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in), (bool) useCRLF);
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_quotedPrintableEncode__Ljava_lang_String_2Z(JNIEnv *env, jclass obj, jstring str, jboolean useCRLF)
{
	QCString  _qcstring;
static QCString * _qcstring_str = 0;
	_qcstring = KCodecs::quotedPrintableEncode((QCString&) * (QCString *) QtSupport::toQCString(env, str, &_qcstring_str), (bool) useCRLF);
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCodecs_quotedPrintableEncode___3B_3BZ(JNIEnv *env, jclass obj, jbyteArray in, jbyteArray out, jboolean useCRLF)
{
static QByteArray * _qbyteArray_out = 0;
static QByteArray * _qbyteArray_in = 0;
	KCodecs::quotedPrintableEncode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, out, &_qbyteArray_out), (bool) useCRLF);
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_quotedPrintableDecode___3B(JNIEnv *env, jclass obj, jbyteArray in)
{
	QCString  _qcstring;
static QByteArray * _qbyteArray_in = 0;
	_qcstring = KCodecs::quotedPrintableDecode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_quotedPrintableDecode__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring str)
{
	QCString  _qcstring;
static QCString * _qcstring_str = 0;
	_qcstring = KCodecs::quotedPrintableDecode((QCString&) * (QCString *) QtSupport::toQCString(env, str, &_qcstring_str));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCodecs_quotedPrintableDecode___3B_3B(JNIEnv *env, jclass obj, jbyteArray in, jbyteArray out)
{
static QByteArray * _qbyteArray_out = 0;
static QByteArray * _qbyteArray_in = 0;
	KCodecs::quotedPrintableDecode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, out, &_qbyteArray_out));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_uuencode___3B(JNIEnv *env, jclass obj, jbyteArray in)
{
	QCString  _qcstring;
static QByteArray * _qbyteArray_in = 0;
	_qcstring = KCodecs::uuencode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_uuencode__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring str)
{
	QCString  _qcstring;
static QCString * _qcstring_str = 0;
	_qcstring = KCodecs::uuencode((QCString&) * (QCString *) QtSupport::toQCString(env, str, &_qcstring_str));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCodecs_uuencode___3B_3B(JNIEnv *env, jclass obj, jbyteArray in, jbyteArray out)
{
static QByteArray * _qbyteArray_out = 0;
static QByteArray * _qbyteArray_in = 0;
	KCodecs::uuencode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, out, &_qbyteArray_out));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_uudecode___3B(JNIEnv *env, jclass obj, jbyteArray in)
{
	QCString  _qcstring;
static QByteArray * _qbyteArray_in = 0;
	_qcstring = KCodecs::uudecode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_uudecode__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring str)
{
	QCString  _qcstring;
static QCString * _qcstring_str = 0;
	_qcstring = KCodecs::uudecode((QCString&) * (QCString *) QtSupport::toQCString(env, str, &_qcstring_str));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCodecs_uudecode___3B_3B(JNIEnv *env, jclass obj, jbyteArray in, jbyteArray out)
{
static QByteArray * _qbyteArray_out = 0;
static QByteArray * _qbyteArray_in = 0;
	KCodecs::uudecode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, out, &_qbyteArray_out));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_base64Encode___3BZ(JNIEnv *env, jclass obj, jbyteArray in, jboolean insertLFs)
{
	QCString  _qcstring;
static QByteArray * _qbyteArray_in = 0;
	_qcstring = KCodecs::base64Encode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in), (bool) insertLFs);
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_base64Encode__Ljava_lang_String_2Z(JNIEnv *env, jclass obj, jstring str, jboolean insertLFs)
{
	QCString  _qcstring;
static QCString * _qcstring_str = 0;
	_qcstring = KCodecs::base64Encode((QCString&) * (QCString *) QtSupport::toQCString(env, str, &_qcstring_str), (bool) insertLFs);
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCodecs_base64Encode___3B_3BZ(JNIEnv *env, jclass obj, jbyteArray in, jbyteArray out, jboolean insertLFs)
{
static QByteArray * _qbyteArray_out = 0;
static QByteArray * _qbyteArray_in = 0;
	KCodecs::base64Encode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, out, &_qbyteArray_out), (bool) insertLFs);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCodecs_base64Encode___3B_3B(JNIEnv *env, jclass obj, jbyteArray in, jbyteArray out)
{
static QByteArray * _qbyteArray_out = 0;
static QByteArray * _qbyteArray_in = 0;
	KCodecs::base64Encode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, out, &_qbyteArray_out), false);
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_base64Decode___3B(JNIEnv *env, jclass obj, jbyteArray in)
{
	QCString  _qcstring;
static QByteArray * _qbyteArray_in = 0;
	_qcstring = KCodecs::base64Decode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCodecs_base64Decode__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring str)
{
	QCString  _qcstring;
static QCString * _qcstring_str = 0;
	_qcstring = KCodecs::base64Decode((QCString&) * (QCString *) QtSupport::toQCString(env, str, &_qcstring_str));
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCodecs_base64Decode___3B_3B(JNIEnv *env, jclass obj, jbyteArray in, jbyteArray out)
{
static QByteArray * _qbyteArray_out = 0;
static QByteArray * _qbyteArray_in = 0;
	KCodecs::base64Decode((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, in, &_qbyteArray_in), (QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, out, &_qbyteArray_out));
	return;
}

