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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdebase/src/tdebase-trinity-14.1.6/kdesktop/KBackgroundIface.h"

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


static const int KBackgroundIface_fhash = 17;
static const char* const KBackgroundIface_ftable[15][3] = {
    { "void", "configure()", "configure()" },
    { "void", "setExport(int)", "setExport(int xport)" },
    { "bool", "isExport()", "isExport()" },
    { "void", "setCommon(int)", "setCommon(int common)" },
    { "bool", "isCommon()", "isCommon()" },
    { "void", "setCache(int,int)", "setCache(int bLimit,int size)" },
    { "void", "setWallpaper(int,TQString,int)", "setWallpaper(int desk,TQString wallpaper,int mode)" },
    { "void", "setWallpaper(TQString,int)", "setWallpaper(TQString wallpaper,int mode)" },
    { "void", "setColor(TQColor,bool)", "setColor(TQColor c,bool isColorA)" },
    { "void", "changeWallpaper()", "changeWallpaper()" },
    { "void", "setBackgroundEnabled(bool)", "setBackgroundEnabled(bool enable)" },
    { "TQString", "currentWallpaper(int)", "currentWallpaper(int desk)" },
    { "TQStringList", "wallpaperList(int)", "wallpaperList(int desk)" },
    { "TQStringList", "wallpaperFiles(int)", "wallpaperFiles(int desk)" },
    { 0, 0, 0 }
};
static const int KBackgroundIface_ftable_hiddens[14] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KBackgroundIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KBackgroundIface_fhash, true, false );
	for ( int i = 0; KBackgroundIface_ftable[i][1]; i++ )
	    fdict->insert( KBackgroundIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void configure()
	replyType = KBackgroundIface_ftable[0][0]; 
	configure( );
    } break;
    case 1: { // void setExport(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KBackgroundIface_ftable[1][0]; 
	setExport(arg0 );
    } break;
    case 2: { // bool isExport()
	replyType = KBackgroundIface_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isExport( );
    } break;
    case 3: { // void setCommon(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KBackgroundIface_ftable[3][0]; 
	setCommon(arg0 );
    } break;
    case 4: { // bool isCommon()
	replyType = KBackgroundIface_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isCommon( );
    } break;
    case 5: { // void setCache(int,int)
	int arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KBackgroundIface_ftable[5][0]; 
	setCache(arg0, arg1 );
    } break;
    case 6: { // void setWallpaper(int,TQString,int)
	int 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 = KBackgroundIface_ftable[6][0]; 
	setWallpaper(arg0, arg1, arg2 );
    } break;
    case 7: { // void setWallpaper(TQString,int)
	TQString arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KBackgroundIface_ftable[7][0]; 
	setWallpaper(arg0, arg1 );
    } break;
    case 8: { // void setColor(TQColor,bool)
	TQColor arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KBackgroundIface_ftable[8][0]; 
	setColor(arg0, arg1 );
    } break;
    case 9: { // void changeWallpaper()
	replyType = KBackgroundIface_ftable[9][0]; 
	changeWallpaper( );
    } break;
    case 10: { // void setBackgroundEnabled(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KBackgroundIface_ftable[10][0]; 
	setBackgroundEnabled(arg0 );
    } break;
    case 11: { // TQString currentWallpaper(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KBackgroundIface_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentWallpaper(arg0 );
    } break;
    case 12: { // TQStringList wallpaperList(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KBackgroundIface_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << wallpaperList(arg0 );
    } break;
    case 13: { // TQStringList wallpaperFiles(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KBackgroundIface_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << wallpaperFiles(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


