summaryrefslogtreecommitdiffstats
path: root/bibletime/bibletimeinterface_skel.cpp
blob: 7d956d6bd91a2432c69667ef163d22bcdf2d6605 (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
/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from bibletimeinterface.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "./bibletimeinterface.h"

#include <kdatastream.h>
#include <qasciidict.h>


static const int BibleTimeInterface_fhash = 17;
static const char* const BibleTimeInterface_ftable[14][3] = {
    { "void", "syncAllBibles(QString)", "syncAllBibles(QString key)" },
    { "void", "syncAllCommentaries(QString)", "syncAllCommentaries(QString key)" },
    { "void", "syncAllLexicons(QString)", "syncAllLexicons(QString key)" },
    { "void", "syncAllVerseBasedModules(QString)", "syncAllVerseBasedModules(QString key)" },
    { "void", "reloadModules()", "reloadModules()" },
    { "void", "openWindow(QString,QString)", "openWindow(QString moduleName,QString key)" },
    { "void", "openDefaultBible(QString)", "openDefaultBible(QString key)" },
    { "void", "closeAllModuleWindows()", "closeAllModuleWindows()" },
    { "QString", "getCurrentReference()", "getCurrentReference()" },
    { "QStringList", "searchInModule(QString,QString)", "searchInModule(QString moduleName,QString searchText)" },
    { "QStringList", "searchInOpenModules(QString)", "searchInOpenModules(QString searchText)" },
    { "QStringList", "searchInDefaultBible(QString)", "searchInDefaultBible(QString searchText)" },
    { "QStringList", "getModulesOfType(QString)", "getModulesOfType(QString type)" },
    { 0, 0, 0 }
};
static const int BibleTimeInterface_ftable_hiddens[13] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool BibleTimeInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    static QAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new QAsciiDict<int>( BibleTimeInterface_fhash, true, false );
	for ( int i = 0; BibleTimeInterface_ftable[i][1]; i++ )
	    fdict->insert( BibleTimeInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void syncAllBibles(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = BibleTimeInterface_ftable[0][0]; 
	syncAllBibles(arg0 );
    } break;
    case 1: { // void syncAllCommentaries(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = BibleTimeInterface_ftable[1][0]; 
	syncAllCommentaries(arg0 );
    } break;
    case 2: { // void syncAllLexicons(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = BibleTimeInterface_ftable[2][0]; 
	syncAllLexicons(arg0 );
    } break;
    case 3: { // void syncAllVerseBasedModules(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = BibleTimeInterface_ftable[3][0]; 
	syncAllVerseBasedModules(arg0 );
    } break;
    case 4: { // void reloadModules()
	replyType = BibleTimeInterface_ftable[4][0]; 
	reloadModules( );
    } break;
    case 5: { // void openWindow(QString,QString)
	QString arg0;
	QString arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = BibleTimeInterface_ftable[5][0]; 
	openWindow(arg0, arg1 );
    } break;
    case 6: { // void openDefaultBible(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = BibleTimeInterface_ftable[6][0]; 
	openDefaultBible(arg0 );
    } break;
    case 7: { // void closeAllModuleWindows()
	replyType = BibleTimeInterface_ftable[7][0]; 
	closeAllModuleWindows( );
    } break;
    case 8: { // QString getCurrentReference()
	replyType = BibleTimeInterface_ftable[8][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getCurrentReference( );
    } break;
    case 9: { // QStringList searchInModule(QString,QString)
	QString arg0;
	QString arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = BibleTimeInterface_ftable[9][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << searchInModule(arg0, arg1 );
    } break;
    case 10: { // QStringList searchInOpenModules(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = BibleTimeInterface_ftable[10][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << searchInOpenModules(arg0 );
    } break;
    case 11: { // QStringList searchInDefaultBible(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = BibleTimeInterface_ftable[11][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << searchInDefaultBible(arg0 );
    } break;
    case 12: { // QStringList getModulesOfType(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = BibleTimeInterface_ftable[12][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getModulesOfType(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList BibleTimeInterface::interfaces()
{
    QCStringList ifaces = DCOPObject::interfaces();
    ifaces += "BibleTimeInterface";
    return ifaces;
}

QCStringList BibleTimeInterface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; BibleTimeInterface_ftable[i][2]; i++ ) {
	if (BibleTimeInterface_ftable_hiddens[i])
	    continue;
	QCString func = BibleTimeInterface_ftable[i][0];
	func += ' ';
	func += BibleTimeInterface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}