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

#include "ksayit.h"

#include <kdatastream.h>


static const char* const KSayItApp_ftable[4][3] = {
    { "ASYNC", "dcopSayText(QString)", "dcopSayText(QString msg)" },
    { "ASYNC", "dcopStop()", "dcopStop()" },
    { "ASYNC", "dcopSayXmlFile(KURL)", "dcopSayXmlFile(KURL url)" },
    { 0, 0, 0 }
};
static const int KSayItApp_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool KSayItApp::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == KSayItApp_ftable[0][1] ) { // void dcopSayText(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	arg >> arg0;
	replyType = KSayItApp_ftable[0][0]; 
	dcopSayText(arg0 );
    } else if ( fun == KSayItApp_ftable[1][1] ) { // void dcopStop()
	replyType = KSayItApp_ftable[1][0]; 
	dcopStop( );
    } else if ( fun == KSayItApp_ftable[2][1] ) { // void dcopSayXmlFile(KURL)
	KURL arg0;
	QDataStream arg( data, IO_ReadOnly );
	arg >> arg0;
	replyType = KSayItApp_ftable[2][0]; 
	dcopSayXmlFile(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

QCStringList KSayItApp::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; KSayItApp_ftable[i][2]; i++ ) {
	if (KSayItApp_ftable_hiddens[i])
	    continue;
	QCString func = KSayItApp_ftable[i][0];
	func += ' ';
	func += KSayItApp_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


