/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from dcopinterface.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-tdenetwork/src/tdenetwork-trinity-14.1.6/kdict/dcopinterface.h"

#include <kdatastream.h>
#include <tqasciidict.h>


static const int KDictIface_fhash = 17;
static const char* const KDictIface_ftable[15][3] = {
    { "void", "quit()", "quit()" },
    { "void", "makeActiveWindow()", "makeActiveWindow()" },
    { "void", "definePhrase(TQString)", "definePhrase(TQString phrase)" },
    { "void", "matchPhrase(TQString)", "matchPhrase(TQString phrase)" },
    { "void", "defineClipboardContent()", "defineClipboardContent()" },
    { "void", "matchClipboardContent()", "matchClipboardContent()" },
    { "TQStringList", "getDatabases()", "getDatabases()" },
    { "TQString", "currentDatabase()", "currentDatabase()" },
    { "TQStringList", "getStrategies()", "getStrategies()" },
    { "TQString", "currentStrategy()", "currentStrategy()" },
    { "bool", "setDatabase(TQString)", "setDatabase(TQString db)" },
    { "bool", "setStrategy(TQString)", "setStrategy(TQString strategy)" },
    { "bool", "historyGoBack()", "historyGoBack()" },
    { "bool", "historyGoForward()", "historyGoForward()" },
    { 0, 0, 0 }
};
static const int KDictIface_ftable_hiddens[14] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KDictIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KDictIface_fhash, true, false );
	for ( int i = 0; KDictIface_ftable[i][1]; i++ )
	    fdict->insert( KDictIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void quit()
	replyType = KDictIface_ftable[0][0]; 
	quit( );
    } break;
    case 1: { // void makeActiveWindow()
	replyType = KDictIface_ftable[1][0]; 
	makeActiveWindow( );
    } break;
    case 2: { // void definePhrase(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDictIface_ftable[2][0]; 
	definePhrase(arg0 );
    } break;
    case 3: { // void matchPhrase(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDictIface_ftable[3][0]; 
	matchPhrase(arg0 );
    } break;
    case 4: { // void defineClipboardContent()
	replyType = KDictIface_ftable[4][0]; 
	defineClipboardContent( );
    } break;
    case 5: { // void matchClipboardContent()
	replyType = KDictIface_ftable[5][0]; 
	matchClipboardContent( );
    } break;
    case 6: { // TQStringList getDatabases()
	replyType = KDictIface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getDatabases( );
    } break;
    case 7: { // TQString currentDatabase()
	replyType = KDictIface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentDatabase( );
    } break;
    case 8: { // TQStringList getStrategies()
	replyType = KDictIface_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getStrategies( );
    } break;
    case 9: { // TQString currentStrategy()
	replyType = KDictIface_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentStrategy( );
    } break;
    case 10: { // bool setDatabase(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDictIface_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setDatabase(arg0 );
    } break;
    case 11: { // bool setStrategy(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDictIface_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setStrategy(arg0 );
    } break;
    case 12: { // bool historyGoBack()
	replyType = KDictIface_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << historyGoBack( );
    } break;
    case 13: { // bool historyGoForward()
	replyType = KDictIface_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << historyGoForward( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

QCStringList KDictIface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; KDictIface_ftable[i][2]; i++ ) {
	if (KDictIface_ftable_hiddens[i])
	    continue;
	TQCString func = KDictIface_ftable[i][0];
	func += ' ';
	func += KDictIface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


