//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqstring.h>
#include <tqtextcodec.h>
#include <tqcstring.h>

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QTextCodec_canEncode__C(JNIEnv* env, jobject obj, jchar arg1)
{
static TQChar* _qchar_arg1 = 0;
	jboolean xret = (jboolean) ((TQTextCodec*) QtSupport::getQt(env, obj))->canEncode((TQChar)*(TQChar*) QtSupport::toTQChar(env, arg1, &_qchar_arg1));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QTextCodec_canEncode__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring arg1)
{
static TQString* _qstring_arg1 = 0;
	jboolean xret = (jboolean) ((TQTextCodec*) QtSupport::getQt(env, obj))->canEncode((const TQString&)*(TQString*) QtSupport::toTQString(env, arg1, &_qstring_arg1));
	return xret;
}

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

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

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

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

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

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

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

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

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

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

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QTextCodec_fromUnicode__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring uc)
{
	TQCString  _qstring;
static TQString* _qstring_uc = 0;
	_qstring = ((TQTextCodec*) QtSupport::getQt(env, obj))->fromUnicode((const TQString&)*(TQString*) QtSupport::toTQString(env, uc, &_qstring_uc));
	return QtSupport::fromTQCString(env, &_qstring);
}

JNIEXPORT jbyteArray JNICALL
Java_org_trinitydesktop_qt_QTextCodec_fromUnicode__Ljava_lang_String_2II(JNIEnv* env, jobject obj, jstring uc, jint from, jint len)
{
	TQByteArray _qbyteArray;
static TQString* _qstring_uc = 0;
	_qbyteArray = ((TQTextCodec*) QtSupport::getQt(env, obj))->fromUnicode((const TQString&)*(TQString*) QtSupport::toTQString(env, uc, &_qstring_uc), (int) from, (int) len);
	return QtSupport::fromTQByteArray(env, &_qbyteArray);
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QTextCodec_fromUnicode__Ljava_lang_String_2_3I(JNIEnv* env, jobject obj, jstring uc, jintArray lenInOut)
{
	TQCString  _qstring;
static TQString* _qstring_uc = 0;
	int* _int_lenInOut = QtSupport::toIntPtr(env, lenInOut);
	_qstring = ((TQTextCodec*) QtSupport::getQt(env, obj))->fromUnicode((const TQString&)*(TQString*) QtSupport::toTQString(env, uc, &_qstring_uc),  (int&) *_int_lenInOut);
	env->SetIntArrayRegion(lenInOut, 0, 1, (jint *) _int_lenInOut);
	return QtSupport::fromTQCString(env, &_qstring);
}

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

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

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QTextCodec_loadCharmapFile(JNIEnv* env, jclass cls, jstring filename)
{
	(void) cls;
static TQString* _qstring_filename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)TQTextCodec::loadCharmapFile((TQString)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename)), "org.trinitydesktop.qt.TQTextCodec");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QTextCodec_loadCharmap(JNIEnv* env, jclass cls, jobject arg1)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)TQTextCodec::loadCharmap((TQIODevice*) QtSupport::getQt(env, arg1)), "org.trinitydesktop.qt.TQTextCodec");
	return xret;
}

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

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QTextCodec_makeDecoder(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((TQTextCodec*) QtSupport::getQt(env, obj))->makeDecoder(), "org.trinitydesktop.qt.TQTextDecoder");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QTextCodec_makeEncoder(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((TQTextCodec*) QtSupport::getQt(env, obj))->makeEncoder(), "org.trinitydesktop.qt.TQTextEncoder");
	return xret;
}

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

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

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

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

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

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

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QTextCodec_toUnicode__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring arg1)
{
	TQString  _qstring;
static TQCString* _qcstring_arg1 = 0;
	_qstring = ((TQTextCodec*) QtSupport::getQt(env, obj))->toUnicode((const TQCString&)*(TQCString*) QtSupport::toTQCString(env, arg1, &_qcstring_arg1));
	return QtSupport::fromTQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QTextCodec_toUnicode__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring chars, jint len)
{
	TQString  _qstring;
static TQCString* _qstring_chars = 0;
	_qstring = ((TQTextCodec*) QtSupport::getQt(env, obj))->toUnicode((const char*) QtSupport::toCharString(env, chars, &_qstring_chars), (int) len);
	return QtSupport::fromTQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QTextCodec_toUnicode___3B(JNIEnv* env, jobject obj, jbyteArray arg1)
{
	TQString  _qstring;
static TQByteArray* _qbyteArray_arg1 = 0;
	_qstring = ((TQTextCodec*) QtSupport::getQt(env, obj))->toUnicode((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, arg1, &_qbyteArray_arg1));
	return QtSupport::fromTQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QTextCodec_toUnicode___3BI(JNIEnv* env, jobject obj, jbyteArray arg1, jint len)
{
	TQString  _qstring;
static TQByteArray* _qbyteArray_arg1 = 0;
	_qstring = ((TQTextCodec*) QtSupport::getQt(env, obj))->toUnicode((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, arg1, &_qbyteArray_arg1), (int) len);
	return QtSupport::fromTQString(env, &_qstring);
}

