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

#include "/opt/trinity/include/kspeech.h"

#include <kdatastream.h>
#include <tqasciidict.h>


static const int KSpeech_fhash = 37;
static const char* const KSpeech_ftable[36][3] = {
    { "bool", "supportsMarkup(TQString,uint)", "supportsMarkup(TQString talker,uint markupType)" },
    { "bool", "supportsMarkers(TQString)", "supportsMarkers(TQString talker)" },
    { "ASYNC", "sayScreenReaderOutput(TQString,TQString)", "sayScreenReaderOutput(TQString msg,TQString talker)" },
    { "ASYNC", "sayWarning(TQString,TQString)", "sayWarning(TQString warning,TQString talker)" },
    { "ASYNC", "sayMessage(TQString,TQString)", "sayMessage(TQString message,TQString talker)" },
    { "ASYNC", "setSentenceDelimiter(TQString)", "setSentenceDelimiter(TQString delimiter)" },
    { "uint", "setText(TQString,TQString)", "setText(TQString text,TQString talker)" },
    { "uint", "sayText(TQString,TQString)", "sayText(TQString text,TQString talker)" },
    { "int", "appendText(TQString,uint)", "appendText(TQString text,uint jobNum)" },
    { "uint", "setFile(TQString,TQString,TQString)", "setFile(TQString filename,TQString talker,TQString encoding)" },
    { "int", "getTextCount(uint)", "getTextCount(uint jobNum)" },
    { "uint", "getCurrentTextJob()", "getCurrentTextJob()" },
    { "uint", "getTextJobCount()", "getTextJobCount()" },
    { "TQString", "getTextJobNumbers()", "getTextJobNumbers()" },
    { "int", "getTextJobState(uint)", "getTextJobState(uint jobNum)" },
    { "TQByteArray", "getTextJobInfo(uint)", "getTextJobInfo(uint jobNum)" },
    { "TQString", "talkerCodeToTalkerId(TQString)", "talkerCodeToTalkerId(TQString talkerCode)" },
    { "TQString", "getTextJobSentence(uint,uint)", "getTextJobSentence(uint jobNum,uint seq)" },
    { "bool", "isSpeakingText()", "isSpeakingText()" },
    { "ASYNC", "removeText(uint)", "removeText(uint jobNum)" },
    { "ASYNC", "startText(uint)", "startText(uint jobNum)" },
    { "ASYNC", "stopText(uint)", "stopText(uint jobNum)" },
    { "ASYNC", "pauseText(uint)", "pauseText(uint jobNum)" },
    { "ASYNC", "resumeText(uint)", "resumeText(uint jobNum)" },
    { "TQStringList", "getTalkers()", "getTalkers()" },
    { "ASYNC", "changeTextTalker(TQString,uint)", "changeTextTalker(TQString talker,uint jobNum)" },
    { "TQString", "userDefaultTalker()", "userDefaultTalker()" },
    { "ASYNC", "moveTextLater(uint)", "moveTextLater(uint jobNum)" },
    { "int", "jumpToTextPart(int,uint)", "jumpToTextPart(int partNum,uint jobNum)" },
    { "uint", "moveRelTextSentence(int,uint)", "moveRelTextSentence(int n,uint jobNum)" },
    { "ASYNC", "speakClipboard()", "speakClipboard()" },
    { "void", "showDialog()", "showDialog()" },
    { "void", "kttsdExit()", "kttsdExit()" },
    { "void", "reinit()", "reinit()" },
    { "TQString", "version()", "version()" },
    { 0, 0, 0 }
};
static const int KSpeech_ftable_hiddens[35] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KSpeech::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KSpeech_fhash, true, false );
	for ( int i = 0; KSpeech_ftable[i][1]; i++ )
	    fdict->insert( KSpeech_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // bool supportsMarkup(TQString,uint)
	TQString arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << supportsMarkup(arg0, arg1 );
    } break;
    case 1: { // bool supportsMarkers(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << supportsMarkers(arg0 );
    } break;
    case 2: { // void sayScreenReaderOutput(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[2][0]; 
	sayScreenReaderOutput(arg0, arg1 );
    } break;
    case 3: { // void sayWarning(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[3][0]; 
	sayWarning(arg0, arg1 );
    } break;
    case 4: { // void sayMessage(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[4][0]; 
	sayMessage(arg0, arg1 );
    } break;
    case 5: { // void setSentenceDelimiter(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[5][0]; 
	setSentenceDelimiter(arg0 );
    } break;
    case 6: { // uint setText(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setText(arg0, arg1 );
    } break;
    case 7: { // uint sayText(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sayText(arg0, arg1 );
    } break;
    case 8: { // int appendText(TQString,uint)
	TQString arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << appendText(arg0, arg1 );
    } break;
    case 9: { // uint setFile(TQString,TQString,TQString)
	TQString arg0;
	TQString 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 = KSpeech_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setFile(arg0, arg1, arg2 );
    } break;
    case 10: { // int getTextCount(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTextCount(arg0 );
    } break;
    case 11: { // uint getCurrentTextJob()
	replyType = KSpeech_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getCurrentTextJob( );
    } break;
    case 12: { // uint getTextJobCount()
	replyType = KSpeech_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTextJobCount( );
    } break;
    case 13: { // TQString getTextJobNumbers()
	replyType = KSpeech_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTextJobNumbers( );
    } break;
    case 14: { // int getTextJobState(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTextJobState(arg0 );
    } break;
    case 15: { // TQByteArray getTextJobInfo(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTextJobInfo(arg0 );
    } break;
    case 16: { // TQString talkerCodeToTalkerId(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << talkerCodeToTalkerId(arg0 );
    } break;
    case 17: { // TQString getTextJobSentence(uint,uint)
	uint arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[17][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTextJobSentence(arg0, arg1 );
    } break;
    case 18: { // bool isSpeakingText()
	replyType = KSpeech_ftable[18][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isSpeakingText( );
    } break;
    case 19: { // void removeText(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[19][0]; 
	removeText(arg0 );
    } break;
    case 20: { // void startText(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[20][0]; 
	startText(arg0 );
    } break;
    case 21: { // void stopText(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[21][0]; 
	stopText(arg0 );
    } break;
    case 22: { // void pauseText(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[22][0]; 
	pauseText(arg0 );
    } break;
    case 23: { // void resumeText(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[23][0]; 
	resumeText(arg0 );
    } break;
    case 24: { // TQStringList getTalkers()
	replyType = KSpeech_ftable[24][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTalkers( );
    } break;
    case 25: { // void changeTextTalker(TQString,uint)
	TQString arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[25][0]; 
	changeTextTalker(arg0, arg1 );
    } break;
    case 26: { // TQString userDefaultTalker()
	replyType = KSpeech_ftable[26][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << userDefaultTalker( );
    } break;
    case 27: { // void moveTextLater(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSpeech_ftable[27][0]; 
	moveTextLater(arg0 );
    } break;
    case 28: { // int jumpToTextPart(int,uint)
	int arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[28][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << jumpToTextPart(arg0, arg1 );
    } break;
    case 29: { // uint moveRelTextSentence(int,uint)
	int arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSpeech_ftable[29][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << moveRelTextSentence(arg0, arg1 );
    } break;
    case 30: { // void speakClipboard()
	replyType = KSpeech_ftable[30][0]; 
	speakClipboard( );
    } break;
    case 31: { // void showDialog()
	replyType = KSpeech_ftable[31][0]; 
	showDialog( );
    } break;
    case 32: { // void kttsdExit()
	replyType = KSpeech_ftable[32][0]; 
	kttsdExit( );
    } break;
    case 33: { // void reinit()
	replyType = KSpeech_ftable[33][0]; 
	reinit( );
    } break;
    case 34: { // TQString version()
	replyType = KSpeech_ftable[34][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << version( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

void KSpeech::ignoreThis()
{
    TQByteArray data;
    emitDCOPSignal( "ignoreThis()", data );
}

void KSpeech::kttsdStarted()
{
    TQByteArray data;
    emitDCOPSignal( "kttsdStarted()", data );
}

void KSpeech::kttsdExiting()
{
    TQByteArray data;
    emitDCOPSignal( "kttsdExiting()", data );
}

void KSpeech::markerSeen( const TQCString& arg0, const TQString& arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "markerSeen(TQCString,TQString)", data );
}

void KSpeech::sentenceStarted( const TQCString& arg0, uint arg1, uint arg2 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    emitDCOPSignal( "sentenceStarted(TQCString,uint,uint)", data );
}

void KSpeech::sentenceFinished( const TQCString& arg0, uint arg1, uint arg2 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    emitDCOPSignal( "sentenceFinished(TQCString,uint,uint)", data );
}

void KSpeech::textSet( const TQCString& arg0, uint arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "textSet(TQCString,uint)", data );
}

void KSpeech::textAppended( const TQCString& arg0, uint arg1, int arg2 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    emitDCOPSignal( "textAppended(TQCString,uint,int)", data );
}

void KSpeech::textStarted( const TQCString& arg0, uint arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "textStarted(TQCString,uint)", data );
}

void KSpeech::textFinished( const TQCString& arg0, uint arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "textFinished(TQCString,uint)", data );
}

void KSpeech::textStopped( const TQCString& arg0, uint arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "textStopped(TQCString,uint)", data );
}

void KSpeech::textPaused( const TQCString& arg0, uint arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "textPaused(TQCString,uint)", data );
}

void KSpeech::textResumed( const TQCString& arg0, uint arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "textResumed(TQCString,uint)", data );
}

void KSpeech::textRemoved( const TQCString& arg0, uint arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "textRemoved(TQCString,uint)", data );
}


