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

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-tdemultimedia/src/tdemultimedia-trinity-14.1.6/noatun/modules/winskin/waSkinManager.h"

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


static const int WaSkinManager_fhash = 11;
static const char* const WaSkinManager_ftable[9][3] = {
    { "TQStringList", "availableSkins()", "availableSkins()" },
    { "TQString", "currentSkin()", "currentSkin()" },
    { "bool", "loadSkin(TQString)", "loadSkin(TQString skinName)" },
    { "TQString", "defaultSkin()", "defaultSkin()" },
    { "bool", "installSkin(TQString)", "installSkin(TQString url)" },
    { "bool", "skinRemovable(TQString)", "skinRemovable(TQString skinName)" },
    { "bool", "removeSkin(TQString)", "removeSkin(TQString skinName)" },
    { "TQStringList", "skinMimeTypes()", "skinMimeTypes()" },
    { 0, 0, 0 }
};
static const int WaSkinManager_ftable_hiddens[8] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool WaSkinManager::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( WaSkinManager_fhash, true, false );
	for ( int i = 0; WaSkinManager_ftable[i][1]; i++ )
	    fdict->insert( WaSkinManager_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // TQStringList availableSkins()
	replyType = WaSkinManager_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << availableSkins( );
    } break;
    case 1: { // TQString currentSkin()
	replyType = WaSkinManager_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentSkin( );
    } break;
    case 2: { // bool loadSkin(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WaSkinManager_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << loadSkin(arg0 );
    } break;
    case 3: { // TQString defaultSkin()
	replyType = WaSkinManager_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << defaultSkin( );
    } break;
    case 4: { // bool installSkin(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WaSkinManager_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << installSkin(arg0 );
    } break;
    case 5: { // bool skinRemovable(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WaSkinManager_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << skinRemovable(arg0 );
    } break;
    case 6: { // bool removeSkin(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WaSkinManager_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << removeSkin(arg0 );
    } break;
    case 7: { // TQStringList skinMimeTypes()
	replyType = WaSkinManager_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << skinMimeTypes( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


