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

#include <kdatastream.h>


static const char* const KeyInterface_ftable[6][3] = {
    { "void", "showKeyInfo(TQString)", "showKeyInfo(TQString keyID)" },
    { "bool", "importRemoteKey(TQString)", "importRemoteKey(TQString keyID)" },
    { "void", "showOptions()", "showOptions()" },
    { "void", "showKeyServer()", "showKeyServer()" },
    { "void", "showKeyManager()", "showKeyManager()" },
    { 0, 0, 0 }
};
static const int KeyInterface_ftable_hiddens[5] = {
    0,
    0,
    0,
    0,
    0,
};

bool KeyInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KeyInterface_ftable[0][1] ) { // void showKeyInfo(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KeyInterface_ftable[0][0]; 
	showKeyInfo(arg0 );
    } else if ( fun == KeyInterface_ftable[1][1] ) { // bool importRemoteKey(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KeyInterface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << importRemoteKey(arg0 );
    } else if ( fun == KeyInterface_ftable[2][1] ) { // void showOptions()
	replyType = KeyInterface_ftable[2][0]; 
	showOptions( );
    } else if ( fun == KeyInterface_ftable[3][1] ) { // void showKeyServer()
	replyType = KeyInterface_ftable[3][0]; 
	showKeyServer( );
    } else if ( fun == KeyInterface_ftable[4][1] ) { // void showKeyManager()
	replyType = KeyInterface_ftable[4][0]; 
	showKeyManager( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


