//Auto-generated by kalyptus. DO NOT EDIT.
#include <qstring.h>
#include <qtextcodec.h>
#include <qcstring.h>

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QTextCodec_canEncode__C(JNIEnv* env, jobject obj, jchar arg1)
{
static QChar* _qchar_arg1 = 0;
	jboolean xret = (jboolean) ((QTextCodec*) QtSupport::getQt(env, obj))->canEncode((QChar)*(QChar*) QtSupport::toQChar(env, arg1, &_qchar_arg1));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QTextCodec_canEncode__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring arg1)
{
static QString* _qstring_arg1 = 0;
	jboolean xret = (jboolean) ((QTextCodec*) QtSupport::getQt(env, obj))->canEncode((const QString&)*(QString*) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return xret;
}

JNIEXPORT jshort JNICALL
Java_org_kde_qt_QTextCodec_characterFromUnicode(JNIEnv* env, jobject obj, jstring str, jint pos)
{
static QString* _qstring_str = 0;
	jshort xret = (jshort) ((QTextCodec*) QtSupport::getQt(env, obj))->characterFromUnicode((const QString&)*(QString*) QtSupport::toQString(env, str, &_qstring_str), (int) pos);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_codecForCStrings(JNIEnv* env, jclass cls)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::codecForCStrings(), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_codecForContent(JNIEnv* env, jclass cls, jstring chars, jint len)
{
	(void) cls;
static QCString* _qstring_chars = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::codecForContent((const char*) QtSupport::toCharString(env, chars, &_qstring_chars), (int) len), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_codecForIndex(JNIEnv* env, jclass cls, jint i)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::codecForIndex((int) i), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_codecForLocale(JNIEnv* env, jclass cls)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::codecForLocale(), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_codecForMib(JNIEnv* env, jclass cls, jint mib)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::codecForMib((int) mib), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_codecForName__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring hint)
{
	(void) cls;
static QCString* _qstring_hint = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::codecForName((const char*) QtSupport::toCharString(env, hint, &_qstring_hint)), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_codecForName__Ljava_lang_String_2I(JNIEnv* env, jclass cls, jstring hint, jint accuracy)
{
	(void) cls;
static QCString* _qstring_hint = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::codecForName((const char*) QtSupport::toCharString(env, hint, &_qstring_hint), (int) accuracy), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_codecForTr(JNIEnv* env, jclass cls)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::codecForTr(), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QTextCodec_deleteAllCodecs(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	QTextCodec::deleteAllCodecs();
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QTextCodec_fromUnicode__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring uc)
{
	QCString  _qstring;
static QString* _qstring_uc = 0;
	_qstring = ((QTextCodec*) QtSupport::getQt(env, obj))->fromUnicode((const QString&)*(QString*) QtSupport::toQString(env, uc, &_qstring_uc));
	return QtSupport::fromQCString(env, &_qstring);
}

JNIEXPORT jbyteArray JNICALL
Java_org_kde_qt_QTextCodec_fromUnicode__Ljava_lang_String_2II(JNIEnv* env, jobject obj, jstring uc, jint from, jint len)
{
	QByteArray _qbyteArray;
static QString* _qstring_uc = 0;
	_qbyteArray = ((QTextCodec*) QtSupport::getQt(env, obj))->fromUnicode((const QString&)*(QString*) QtSupport::toQString(env, uc, &_qstring_uc), (int) from, (int) len);
	return QtSupport::fromQByteArray(env, &_qbyteArray);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QTextCodec_fromUnicode__Ljava_lang_String_2_3I(JNIEnv* env, jobject obj, jstring uc, jintArray lenInOut)
{
	QCString  _qstring;
static QString* _qstring_uc = 0;
	int* _int_lenInOut = QtSupport::toIntPtr(env, lenInOut);
	_qstring = ((QTextCodec*) QtSupport::getQt(env, obj))->fromUnicode((const QString&)*(QString*) QtSupport::toQString(env, uc, &_qstring_uc),  (int&) *_int_lenInOut);
	env->SetIntArrayRegion(lenInOut, 0, 1, (jint *) _int_lenInOut);
	return QtSupport::fromQCString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QTextCodec_heuristicContentMatch(JNIEnv* env, jobject obj, jstring chars, jint len)
{
static QCString* _qstring_chars = 0;
	jint xret = (jint) ((QTextCodec*) QtSupport::getQt(env, obj))->heuristicContentMatch((const char*) QtSupport::toCharString(env, chars, &_qstring_chars), (int) len);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QTextCodec_heuristicNameMatch(JNIEnv* env, jobject obj, jstring hint)
{
static QCString* _qstring_hint = 0;
	jint xret = (jint) ((QTextCodec*) QtSupport::getQt(env, obj))->heuristicNameMatch((const char*) QtSupport::toCharString(env, hint, &_qstring_hint));
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_loadCharmapFile(JNIEnv* env, jclass cls, jstring filename)
{
	(void) cls;
static QString* _qstring_filename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::loadCharmapFile((QString)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename)), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_loadCharmap(JNIEnv* env, jclass cls, jobject arg1)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)QTextCodec::loadCharmap((QIODevice*) QtSupport::getQt(env, arg1)), "org.kde.qt.QTextCodec");
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QTextCodec_locale(JNIEnv* env, jclass cls)
{
	const char* _qstring;
	(void) cls;
	_qstring = QTextCodec::locale();
	return QtSupport::fromCharString(env, (char *) _qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_makeDecoder(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((QTextCodec*) QtSupport::getQt(env, obj))->makeDecoder(), "org.kde.qt.QTextDecoder");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QTextCodec_makeEncoder(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((QTextCodec*) QtSupport::getQt(env, obj))->makeEncoder(), "org.kde.qt.QTextEncoder");
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QTextCodec_mibEnum(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((QTextCodec*) QtSupport::getQt(env, obj))->mibEnum();
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QTextCodec_mimeName(JNIEnv* env, jobject obj)
{
	const char* _qstring;
	_qstring = ((QTextCodec*) QtSupport::getQt(env, obj))->mimeName();
	return QtSupport::fromCharString(env, (char *) _qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QTextCodec_name(JNIEnv* env, jobject obj)
{
	const char* _qstring;
	_qstring = ((QTextCodec*) QtSupport::getQt(env, obj))->name();
	return QtSupport::fromCharString(env, (char *) _qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QTextCodec_setCodecForCStrings(JNIEnv* env, jclass cls, jobject c)
{
	(void) cls;
	QTextCodec::setCodecForCStrings((QTextCodec*) QtSupport::getQt(env, c));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QTextCodec_setCodecForLocale(JNIEnv* env, jclass cls, jobject c)
{
	(void) cls;
	QTextCodec::setCodecForLocale((QTextCodec*) QtSupport::getQt(env, c));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QTextCodec_setCodecForTr(JNIEnv* env, jclass cls, jobject c)
{
	(void) cls;
	QTextCodec::setCodecForTr((QTextCodec*) QtSupport::getQt(env, c));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QTextCodec_toUnicode__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring arg1)
{
	QString  _qstring;
static QCString* _qcstring_arg1 = 0;
	_qstring = ((QTextCodec*) QtSupport::getQt(env, obj))->toUnicode((const QCString&)*(QCString*) QtSupport::toQCString(env, arg1, &_qcstring_arg1));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QTextCodec_toUnicode__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring chars, jint len)
{
	QString  _qstring;
static QCString* _qstring_chars = 0;
	_qstring = ((QTextCodec*) QtSupport::getQt(env, obj))->toUnicode((const char*) QtSupport::toCharString(env, chars, &_qstring_chars), (int) len);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QTextCodec_toUnicode___3B(JNIEnv* env, jobject obj, jbyteArray arg1)
{
	QString  _qstring;
static QByteArray* _qbyteArray_arg1 = 0;
	_qstring = ((QTextCodec*) QtSupport::getQt(env, obj))->toUnicode((const QByteArray&)*(QByteArray*) QtSupport::toQByteArray(env, arg1, &_qbyteArray_arg1));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QTextCodec_toUnicode___3BI(JNIEnv* env, jobject obj, jbyteArray arg1, jint len)
{
	QString  _qstring;
static QByteArray* _qbyteArray_arg1 = 0;
	_qstring = ((QTextCodec*) QtSupport::getQt(env, obj))->toUnicode((const QByteArray&)*(QByteArray*) QtSupport::toQByteArray(env, arg1, &_qbyteArray_arg1), (int) len);
	return QtSupport::fromQString(env, &_qstring);
}

