summaryrefslogtreecommitdiffstats
path: root/tdejava/koala/tdejava/KMimeMagic.cpp
blob: 5168f6ca57a03d66add8c7793dc80575b763110b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqstring.h>
#include <kmimemagic.h>
#include <tqcstring.h>

#include <qtjava/QtSupport.h>
#include <tdejava/TDESupport.h>
#include <tdejava/KMimeMagic.h>

class KMimeMagicJBridge : public KMimeMagic
{
public:
	KMimeMagicJBridge() : KMimeMagic() {};
	KMimeMagicJBridge(const TQString& arg1) : KMimeMagic(arg1) {};
	static void protected_initStatic() {
		KMimeMagic::initStatic();
		return;
	}
	~KMimeMagicJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KMimeMagic_finalize(env, obj);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_findBufferFileType(JNIEnv* env, jobject obj, jbyteArray arg1, jstring filename)
{
static TQByteArray* _qbyteArray_arg1 = 0;
static TQString* _qstring_filename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KMimeMagic*) QtSupport::getQt(env, obj))->findBufferFileType((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, arg1, &_qbyteArray_arg1), (const TQString&)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename)), "org.trinitydesktop.koala.KMimeMagicResult");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_findBufferType(JNIEnv* env, jobject obj, jbyteArray p)
{
static TQByteArray* _qbyteArray_p = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KMimeMagic*) QtSupport::getQt(env, obj))->findBufferType((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, p, &_qbyteArray_p)), "org.trinitydesktop.koala.KMimeMagicResult");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_findFileType(JNIEnv* env, jobject obj, jstring _filename)
{
static TQString* _qstring__filename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KMimeMagic*) QtSupport::getQt(env, obj))->findFileType((const TQString&)*(TQString*) QtSupport::toTQString(env, _filename, &_qstring__filename)), "org.trinitydesktop.koala.KMimeMagicResult");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_initStatic(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	KMimeMagicJBridge::protected_initStatic();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_isDisposed(JNIEnv* env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_mergeConfig(JNIEnv* env, jobject obj, jstring configFile)
{
static TQString* _qstring_configFile = 0;
	jboolean xret = (jboolean) ((KMimeMagic*) QtSupport::getQt(env, obj))->mergeConfig((const TQString&)*(TQString*) QtSupport::toTQString(env, configFile, &_qstring_configFile));
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_newKMimeMagic__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring configFile)
{
static TQString* _qstring_configFile = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KMimeMagicJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, configFile, &_qstring_configFile)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_self(JNIEnv* env, jclass cls)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KMimeMagicJBridge::self(), "org.trinitydesktop.koala.KMimeMagic");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_setFollowLinks(JNIEnv* env, jobject obj, jboolean _enable)
{
	((KMimeMagic*) QtSupport::getQt(env, obj))->setFollowLinks((bool) _enable);
	return;
}