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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdelibs/src/tdelibs-trinity-14.1.6/tdeprint/tdeprintd.h"

#include <kdatastream.h>


static const char* const KDEPrintd_ftable[6][3] = {
    { "int", "print(TQString,TQStringList,bool)", "print(TQString cmd,TQStringList files,bool remove)" },
    { "TQString", "openPassDlg(TQString)", "openPassDlg(TQString user)" },
    { "ASYNC", "statusMessage(TQString,int,TQString)", "statusMessage(TQString msg,int pid,TQString appName)" },
    { "TQString", "requestPassword(TQString,TQString,int,int)", "requestPassword(TQString user,TQString host,int port,int seqNbr)" },
    { "void", "initPassword(TQString,TQString,TQString,int)", "initPassword(TQString user,TQString passwd,TQString host,int port)" },
    { 0, 0, 0 }
};
static const int KDEPrintd_ftable_hiddens[5] = {
    0,
    0,
    0,
    0,
    0,
};

bool KDEPrintd::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KDEPrintd_ftable[0][1] ) { // int print(TQString,TQStringList,bool)
	TQString arg0;
	TQStringList 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 = KDEPrintd_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << print(arg0, arg1, arg2 );
    } else if ( fun == KDEPrintd_ftable[1][1] ) { // TQString openPassDlg(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDEPrintd_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << openPassDlg(arg0 );
    } else if ( fun == KDEPrintd_ftable[2][1] ) { // void statusMessage(TQString,int,TQString)
	TQString arg0;
	int arg1;
	TQString 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 = KDEPrintd_ftable[2][0]; 
	statusMessage(arg0, arg1, arg2 );
    } else if ( fun == KDEPrintd_ftable[3][1] ) { // TQString requestPassword(TQString,TQString,int,int)
	TQString arg0;
	TQString arg1;
	int arg2;
	int arg3;
	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;
	if (arg.atEnd()) return false;
	arg >> arg3;
	replyType = KDEPrintd_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << requestPassword(arg0, arg1, arg2, arg3 );
    } else if ( fun == KDEPrintd_ftable[4][1] ) { // void initPassword(TQString,TQString,TQString,int)
	TQString arg0;
	TQString arg1;
	TQString arg2;
	int arg3;
	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;
	if (arg.atEnd()) return false;
	arg >> arg3;
	replyType = KDEPrintd_ftable[4][0]; 
	initPassword(arg0, arg1, arg2, arg3 );
    } else {
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList KDEPrintd::interfaces()
{
    QCStringList ifaces = KDEDModule::interfaces();
    ifaces += "KDEPrintd";
    return ifaces;
}

QCStringList KDEPrintd::functions()
{
    QCStringList funcs = KDEDModule::functions();
    for ( int i = 0; KDEPrintd_ftable[i][2]; i++ ) {
	if (KDEPrintd_ftable_hiddens[i])
	    continue;
	TQCString func = KDEPrintd_ftable[i][0];
	func += ' ';
	func += KDEPrintd_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


