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

#include "/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/kdeprint/kdeprintd.h"

#include <kdatastream.h>


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

bool KDEPrintd::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == KDEPrintd_ftable[0][1] ) { // int print(QString,QStringList,bool)
	QString arg0;
	QStringList arg1;
	bool arg2;
	QDataStream 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]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << print(arg0, arg1, arg2 );
    } else if ( fun == KDEPrintd_ftable[1][1] ) { // QString openPassDlg(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDEPrintd_ftable[1][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << openPassDlg(arg0 );
    } else if ( fun == KDEPrintd_ftable[2][1] ) { // void statusMessage(QString,int,QString)
	QString arg0;
	int arg1;
	QString arg2;
	QDataStream 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] ) { // QString requestPassword(QString,QString,int,int)
	QString arg0;
	QString arg1;
	int arg2;
	int arg3;
	QDataStream 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]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << requestPassword(arg0, arg1, arg2, arg3 );
    } else if ( fun == KDEPrintd_ftable[4][1] ) { // void initPassword(QString,QString,QString,int)
	QString arg0;
	QString arg1;
	QString arg2;
	int arg3;
	QDataStream 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;
	QCString func = KDEPrintd_ftable[i][0];
	func += ' ';
	func += KDEPrintd_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


