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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
|
/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from dcopinterface.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/
#include "./dcopinterface.h"
#include <kdatastream.h>
#include <tqasciidict.h>
namespace Tellico {
static const int ApplicationInterface_fhash = 17;
static const char* const ApplicationInterface_ftable[16][3] = {
{ "bool", "importTellico(TQString,TQString)", "importTellico(TQString file,TQString action)" },
{ "bool", "importBibtex(TQString,TQString)", "importBibtex(TQString file,TQString action)" },
{ "bool", "importMODS(TQString,TQString)", "importMODS(TQString file,TQString action)" },
{ "bool", "importRIS(TQString,TQString)", "importRIS(TQString file,TQString action)" },
{ "bool", "exportXML(TQString)", "exportXML(TQString file)" },
{ "bool", "exportZip(TQString)", "exportZip(TQString file)" },
{ "bool", "exportBibtex(TQString)", "exportBibtex(TQString file)" },
{ "bool", "exportHTML(TQString)", "exportHTML(TQString file)" },
{ "bool", "exportCSV(TQString)", "exportCSV(TQString file)" },
{ "bool", "exportPilotDB(TQString)", "exportPilotDB(TQString file)" },
{ "TQValueList<long int>", "selectedEntries()", "selectedEntries()" },
{ "TQValueList<long int>", "filteredEntries()", "filteredEntries()" },
{ "void", "openFile(TQString)", "openFile(TQString file)" },
{ "void", "setFilter(TQString)", "setFilter(TQString text)" },
{ "bool", "showEntry(long int)", "showEntry(long int id)" },
{ 0, 0, 0 }
};
static const int ApplicationInterface_ftable_hiddens[15] = {
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
};
bool ApplicationInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
static TQAsciiDict<int>* fdict = 0;
if ( !fdict ) {
fdict = new TQAsciiDict<int>( ApplicationInterface_fhash, true, false );
for ( int i = 0; ApplicationInterface_ftable[i][1]; i++ )
fdict->insert( ApplicationInterface_ftable[i][1], new int( i ) );
}
int* fp = fdict->find( fun );
switch ( fp?*fp:-1) {
case 0: { // bool importTellico(TQString,TQString)
TQString arg0;
TQString arg1;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
if (arg.atEnd()) return false;
arg >> arg1;
replyType = ApplicationInterface_ftable[0][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << importTellico(arg0, arg1 );
} break;
case 1: { // bool importBibtex(TQString,TQString)
TQString arg0;
TQString arg1;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
if (arg.atEnd()) return false;
arg >> arg1;
replyType = ApplicationInterface_ftable[1][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << importBibtex(arg0, arg1 );
} break;
case 2: { // bool importMODS(TQString,TQString)
TQString arg0;
TQString arg1;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
if (arg.atEnd()) return false;
arg >> arg1;
replyType = ApplicationInterface_ftable[2][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << importMODS(arg0, arg1 );
} break;
case 3: { // bool importRIS(TQString,TQString)
TQString arg0;
TQString arg1;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
if (arg.atEnd()) return false;
arg >> arg1;
replyType = ApplicationInterface_ftable[3][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << importRIS(arg0, arg1 );
} break;
case 4: { // bool exportXML(TQString)
TQString arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = ApplicationInterface_ftable[4][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << exportXML(arg0 );
} break;
case 5: { // bool exportZip(TQString)
TQString arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = ApplicationInterface_ftable[5][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << exportZip(arg0 );
} break;
case 6: { // bool exportBibtex(TQString)
TQString arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = ApplicationInterface_ftable[6][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << exportBibtex(arg0 );
} break;
case 7: { // bool exportHTML(TQString)
TQString arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = ApplicationInterface_ftable[7][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << exportHTML(arg0 );
} break;
case 8: { // bool exportCSV(TQString)
TQString arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = ApplicationInterface_ftable[8][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << exportCSV(arg0 );
} break;
case 9: { // bool exportPilotDB(TQString)
TQString arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = ApplicationInterface_ftable[9][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << exportPilotDB(arg0 );
} break;
case 10: { // TQValueList<long int> selectedEntries()
replyType = ApplicationInterface_ftable[10][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << selectedEntries( );
} break;
case 11: { // TQValueList<long int> filteredEntries()
replyType = ApplicationInterface_ftable[11][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << filteredEntries( );
} break;
case 12: { // void openFile(TQString)
TQString arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = ApplicationInterface_ftable[12][0];
openFile(arg0 );
} break;
case 13: { // void setFilter(TQString)
TQString arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = ApplicationInterface_ftable[13][0];
setFilter(arg0 );
} break;
case 14: { // bool showEntry(long int)
long int arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = ApplicationInterface_ftable[14][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << showEntry(arg0 );
} break;
default:
return DCOPObject::process( fun, data, replyType, replyData );
}
return true;
}
QCStringList ApplicationInterface::interfaces()
{
QCStringList ifaces = DCOPObject::interfaces();
ifaces += "Tellico::ApplicationInterface";
return ifaces;
}
QCStringList ApplicationInterface::functions()
{
QCStringList funcs = DCOPObject::functions();
for ( int i = 0; ApplicationInterface_ftable[i][2]; i++ ) {
if (ApplicationInterface_ftable_hiddens[i])
continue;
TQCString func = ApplicationInterface_ftable[i][0];
func += ' ';
func += ApplicationInterface_ftable[i][2];
funcs << func;
}
return funcs;
}
} // namespace
#include <kdatastream.h>
#include <tqasciidict.h>
namespace Tellico {
static const int CollectionInterface_fhash = 11;
static const char* const CollectionInterface_ftable[9][3] = {
{ "long int", "addEntry()", "addEntry()" },
{ "bool", "removeEntry(long int)", "removeEntry(long int entryID)" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "values(TQString)", "values(TQString fieldName)" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "values(long int,TQString)", "values(long int entryID,TQString fieldName)" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "bibtexKeys()", "bibtexKeys()" },
{ TQSTRING_OBJECT_NAME_STRING, "bibtexKey(long int)", "bibtexKey(long int entryID)" },
{ "bool", "setFieldValue(long int,TQString,TQString)", "setFieldValue(long int entryID,TQString fieldName,TQString value)" },
{ "bool", "addFieldValue(long int,TQString,TQString)", "addFieldValue(long int entryID,TQString fieldName,TQString value)" },
{ 0, 0, 0 }
};
static const int CollectionInterface_ftable_hiddens[8] = {
0,
0,
0,
0,
0,
0,
0,
0,
};
bool CollectionInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
static TQAsciiDict<int>* fdict = 0;
if ( !fdict ) {
fdict = new TQAsciiDict<int>( CollectionInterface_fhash, true, false );
for ( int i = 0; CollectionInterface_ftable[i][1]; i++ )
fdict->insert( CollectionInterface_ftable[i][1], new int( i ) );
}
int* fp = fdict->find( fun );
switch ( fp?*fp:-1) {
case 0: { // long int addEntry()
replyType = CollectionInterface_ftable[0][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << addEntry( );
} break;
case 1: { // bool removeEntry(long int)
long int arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = CollectionInterface_ftable[1][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << removeEntry(arg0 );
} break;
case 2: { // TQStringList values(TQString)
TQString arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = CollectionInterface_ftable[2][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << values(arg0 );
} break;
case 3: { // TQStringList values(long int,TQString)
long int arg0;
TQString arg1;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
if (arg.atEnd()) return false;
arg >> arg1;
replyType = CollectionInterface_ftable[3][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << values(arg0, arg1 );
} break;
case 4: { // TQStringList bibtexKeys()
replyType = CollectionInterface_ftable[4][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << bibtexKeys( );
} break;
case 5: { // TQString bibtexKey(long int)
long int arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = CollectionInterface_ftable[5][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << bibtexKey(arg0 );
} break;
case 6: { // bool setFieldValue(long int,TQString,TQString)
long int arg0;
TQString arg1;
TQString arg2;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
if (arg.atEnd()) return false;
arg >> arg1;
if (arg.atEnd()) return false;
arg >> arg2;
replyType = CollectionInterface_ftable[6][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << setFieldValue(arg0, arg1, arg2 );
} break;
case 7: { // bool addFieldValue(long int,TQString,TQString)
long int arg0;
TQString arg1;
TQString arg2;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
if (arg.atEnd()) return false;
arg >> arg1;
if (arg.atEnd()) return false;
arg >> arg2;
replyType = CollectionInterface_ftable[7][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << addFieldValue(arg0, arg1, arg2 );
} break;
default:
return DCOPObject::process( fun, data, replyType, replyData );
}
return true;
}
QCStringList CollectionInterface::interfaces()
{
QCStringList ifaces = DCOPObject::interfaces();
ifaces += "Tellico::CollectionInterface";
return ifaces;
}
QCStringList CollectionInterface::functions()
{
QCStringList funcs = DCOPObject::functions();
for ( int i = 0; CollectionInterface_ftable[i][2]; i++ ) {
if (CollectionInterface_ftable_hiddens[i])
continue;
TQCString func = CollectionInterface_ftable[i][0];
func += ' ';
func += CollectionInterface_ftable[i][2];
funcs << func;
}
return funcs;
}
} // namespace
|