summaryrefslogtreecommitdiffstats
path: root/tdejava/koala/tdejava/KZip.cpp
blob: 6e55531dadbdd54d9210027af3a64d0a96d55c4b (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
//Auto-generated by kalyptus. DO NOT EDIT.
#include <kzip.h>
#include <tqstring.h>

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

class KZipJBridge : public KZip
{
public:
	KZipJBridge(const TQString& arg1) : KZip(arg1) {};
	KZipJBridge(TQIODevice* arg1) : KZip(arg1) {};
	bool protected_openArchive(int arg1) {
		return (bool) KZip::openArchive(arg1);
	}
	bool protected_closeArchive() {
		return (bool) KZip::closeArchive();
	}
	bool protected_writeDir(const TQString& arg1,const TQString& arg2,const TQString& arg3) {
		return (bool) KZip::writeDir(arg1,arg2,arg3);
	}
	bool protected_writeData_impl(const char* arg1,uint arg2) {
		return (bool) KZip::writeData_impl(arg1,arg2);
	}
	bool protected_prepareWriting_impl(const TQString& arg1,const TQString& arg2,const TQString& arg3,uint arg4,mode_t arg5,time_t arg6,time_t arg7,time_t arg8) {
		return (bool) KZip::prepareWriting_impl(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
	}
	bool protected_writeSymLink_impl(const TQString& arg1,const TQString& arg2,const TQString& arg3,const TQString& arg4,mode_t arg5,time_t arg6,time_t arg7,time_t arg8) {
		return (bool) KZip::writeSymLink_impl(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
	}
	~KZipJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_closeArchive(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KZipJBridge*) QtSupport::getQt(env, obj))->protected_closeArchive();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KZip_compression(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KZip*) QtSupport::getQt(env, obj))->compression();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KZip_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KZip_finalize(env, obj);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_doneWriting(JNIEnv* env, jobject obj, jint size)
{
	jboolean xret = (jboolean) ((KZip*) QtSupport::getQt(env, obj))->doneWriting((uint) size);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KZip_extraField(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KZip*) QtSupport::getQt(env, obj))->extraField();
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KZip_fileName(JNIEnv* env, jobject obj)
{
	TQString  _qstring;
	_qstring = ((KZip*) QtSupport::getQt(env, obj))->fileName();
	return QtSupport::fromTQString(env, &_qstring);
}

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KZip_newKZip__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring filename)
{
static TQString* _qstring_filename = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KZipJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_openArchive(JNIEnv* env, jobject obj, jint mode)
{
	jboolean xret = (jboolean) ((KZipJBridge*) QtSupport::getQt(env, obj))->protected_openArchive((int) mode);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_prepareWriting_1impl(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jint size, jlong perm, jint atime, jint mtime, jint ctime)
{
static TQString* _qstring_name = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KZipJBridge*) QtSupport::getQt(env, obj))->protected_prepareWriting_impl((const TQString&)*(TQString*) QtSupport::toTQString(env, name, &_qstring_name), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, group, &_qstring_group), (uint) size, (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_prepareWriting__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jint size)
{
static TQString* _qstring_name = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KZip*) QtSupport::getQt(env, obj))->prepareWriting((const TQString&)*(TQString*) QtSupport::toTQString(env, name, &_qstring_name), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, group, &_qstring_group), (uint) size);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_prepareWriting__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2IJIII(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jint size, jlong perm, jint atime, jint mtime, jint ctime)
{
static TQString* _qstring_name = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KZip*) QtSupport::getQt(env, obj))->prepareWriting((const TQString&)*(TQString*) QtSupport::toTQString(env, name, &_qstring_name), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, group, &_qstring_group), (uint) size, (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KZip_setCompression(JNIEnv* env, jobject obj, jint c)
{
	((KZip*) QtSupport::getQt(env, obj))->setCompression((KZip::Compression) c);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KZip_setExtraField(JNIEnv* env, jobject obj, jint ef)
{
	((KZip*) QtSupport::getQt(env, obj))->setExtraField((KZip::ExtraField) ef);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_writeData_1impl(JNIEnv* env, jobject obj, jstring data, jint size)
{
static TQCString* _qstring_data = 0;
	jboolean xret = (jboolean) ((KZipJBridge*) QtSupport::getQt(env, obj))->protected_writeData_impl((const char*) QtSupport::toCharString(env, data, &_qstring_data), (uint) size);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_writeData(JNIEnv* env, jobject obj, jstring data, jint size)
{
static TQCString* _qstring_data = 0;
	jboolean xret = (jboolean) ((KZip*) QtSupport::getQt(env, obj))->writeData((const char*) QtSupport::toCharString(env, data, &_qstring_data), (uint) size);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_writeDir(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group)
{
static TQString* _qstring_name = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KZipJBridge*) QtSupport::getQt(env, obj))->protected_writeDir((const TQString&)*(TQString*) QtSupport::toTQString(env, name, &_qstring_name), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, group, &_qstring_group));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_writeFile__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2IJIIILjava_lang_String_2(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jint size, jlong perm, jint atime, jint mtime, jint ctime, jstring data)
{
static TQString* _qstring_name = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_group = 0;
static TQCString* _qstring_data = 0;
	jboolean xret = (jboolean) ((KZip*) QtSupport::getQt(env, obj))->writeFile((const TQString&)*(TQString*) QtSupport::toTQString(env, name, &_qstring_name), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, group, &_qstring_group), (uint) size, (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime, (const char*) QtSupport::toCharString(env, data, &_qstring_data));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_writeFile__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2ILjava_lang_String_2(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jint size, jstring data)
{
static TQString* _qstring_name = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_group = 0;
static TQCString* _qstring_data = 0;
	jboolean xret = (jboolean) ((KZip*) QtSupport::getQt(env, obj))->writeFile((const TQString&)*(TQString*) QtSupport::toTQString(env, name, &_qstring_name), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, group, &_qstring_group), (uint) size, (const char*) QtSupport::toCharString(env, data, &_qstring_data));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_writeSymLink_1impl(JNIEnv* env, jobject obj, jstring name, jstring target, jstring user, jstring group, jlong perm, jint atime, jint mtime, jint ctime)
{
static TQString* _qstring_name = 0;
static TQString* _qstring_target = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KZipJBridge*) QtSupport::getQt(env, obj))->protected_writeSymLink_impl((const TQString&)*(TQString*) QtSupport::toTQString(env, name, &_qstring_name), (const TQString&)*(TQString*) QtSupport::toTQString(env, target, &_qstring_target), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, group, &_qstring_group), (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KZip_writeSymLink(JNIEnv* env, jobject obj, jstring name, jstring target, jstring user, jstring group, jlong perm, jint atime, jint mtime, jint ctime)
{
static TQString* _qstring_name = 0;
static TQString* _qstring_target = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KZip*) QtSupport::getQt(env, obj))->writeSymLink((const TQString&)*(TQString*) QtSupport::toTQString(env, name, &_qstring_name), (const TQString&)*(TQString*) QtSupport::toTQString(env, target, &_qstring_target), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, group, &_qstring_group), (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}