/****************************************************************************
**
** 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-base/tde-tdeutils/src/tdeutils-trinity-14.1.6/superkaramba/src/dcopinterface.h"

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


static const int dcopIface_fhash = 13;
static const char* const dcopIface_ftable[12][3] = {
    { "ASYNC", "openTheme(TQString)", "openTheme(TQString file)" },
    { "ASYNC", "openNamedTheme(TQString,TQString,bool)", "openNamedTheme(TQString file,TQString name,bool is_sub_theme)" },
    { "ASYNC", "closeTheme(TQString)", "closeTheme(TQString name)" },
    { "ASYNC", "quit()", "quit()" },
    { "ASYNC", "hideSystemTray(bool)", "hideSystemTray(bool hide)" },
    { "ASYNC", "showThemeDialog()", "showThemeDialog()" },
    { "int", "themeAdded(TQString,TQString)", "themeAdded(TQString appId,TQString file)" },
    { "ASYNC", "themeClosed(TQString,TQString,int)", "themeClosed(TQString appId,TQString file,int instance)" },
    { "ASYNC", "themeNotify(TQString,TQString)", "themeNotify(TQString name,TQString text)" },
    { "ASYNC", "setIncomingData(TQString,TQString)", "setIncomingData(TQString name,TQString obj)" },
    { "bool", "isMainKaramba()", "isMainKaramba()" },
    { 0, 0, 0 }
};
static const int dcopIface_ftable_hiddens[11] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool dcopIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( dcopIface_fhash, true, false );
	for ( int i = 0; dcopIface_ftable[i][1]; i++ )
	    fdict->insert( dcopIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void openTheme(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = dcopIface_ftable[0][0]; 
	openTheme(arg0 );
    } break;
    case 1: { // void openNamedTheme(TQString,TQString,bool)
	TQString arg0;
	TQString arg1;
	bool 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 = dcopIface_ftable[1][0]; 
	openNamedTheme(arg0, arg1, arg2 );
    } break;
    case 2: { // void closeTheme(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = dcopIface_ftable[2][0]; 
	closeTheme(arg0 );
    } break;
    case 3: { // void quit()
	replyType = dcopIface_ftable[3][0]; 
	quit( );
    } break;
    case 4: { // void hideSystemTray(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = dcopIface_ftable[4][0]; 
	hideSystemTray(arg0 );
    } break;
    case 5: { // void showThemeDialog()
	replyType = dcopIface_ftable[5][0]; 
	showThemeDialog( );
    } break;
    case 6: { // int themeAdded(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 = dcopIface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << themeAdded(arg0, arg1 );
    } break;
    case 7: { // void themeClosed(TQString,TQString,int)
	TQString arg0;
	TQString arg1;
	int 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 = dcopIface_ftable[7][0]; 
	themeClosed(arg0, arg1, arg2 );
    } break;
    case 8: { // void themeNotify(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 = dcopIface_ftable[8][0]; 
	themeNotify(arg0, arg1 );
    } break;
    case 9: { // void setIncomingData(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 = dcopIface_ftable[9][0]; 
	setIncomingData(arg0, arg1 );
    } break;
    case 10: { // bool isMainKaramba()
	replyType = dcopIface_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isMainKaramba( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


