/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from kxkb.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/kxkb/kxkb.h"

#include <kdatastream.h>


static const char* const KXKBApp_ftable[4][3] = {
    { "bool", "setLayout(TQString)", "setLayout(TQString layoutPair)" },
    { "TQString", "getCurrentLayout()", "getCurrentLayout()" },
    { "TQStringList", "getLayoutsList()", "getLayoutsList()" },
    { 0, 0, 0 }
};
static const int KXKBApp_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool KXKBApp::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KXKBApp_ftable[0][1] ) { // bool setLayout(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KXKBApp_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setLayout(arg0 );
    } else if ( fun == KXKBApp_ftable[1][1] ) { // TQString getCurrentLayout()
	replyType = KXKBApp_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getCurrentLayout( );
    } else if ( fun == KXKBApp_ftable[2][1] ) { // TQStringList getLayoutsList()
	replyType = KXKBApp_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getLayoutsList( );
    } else {
	return KUniqueApplication::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList KXKBApp::interfaces()
{
    QCStringList ifaces = KUniqueApplication::interfaces();
    ifaces += "KXKBApp";
    return ifaces;
}

QCStringList KXKBApp::functions()
{
    QCStringList funcs = KUniqueApplication::functions();
    for ( int i = 0; KXKBApp_ftable[i][2]; i++ ) {
	if (KXKBApp_ftable_hiddens[i])
	    continue;
	TQCString func = KXKBApp_ftable[i][0];
	func += ' ';
	func += KXKBApp_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


