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

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-tdemultimedia/src/tdemultimedia-trinity-14.1.6/tdemid/tdemidIface.h"

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


static const int KMidIface_fhash = 19;
static const char* const KMidIface_ftable[19][3] = {
    { "int", "openURL(TQString)", "openURL(TQString s)" },
    { "void", "play()", "play()" },
    { "void", "pause()", "pause()" },
    { "void", "stop()", "stop()" },
    { "void", "rewind()", "rewind()" },
    { "void", "forward()", "forward()" },
    { "void", "seek(int)", "seek(int ms)" },
    { "void", "prevSong()", "prevSong()" },
    { "void", "nextSong()", "nextSong()" },
    { "void", "setSongLoop(int)", "setSongLoop(int i)" },
    { "void", "setVolume(int)", "setVolume(int i)" },
    { "void", "setTempo(int)", "setTempo(int i)" },
    { "void", "setSongEncoding(int)", "setSongEncoding(int i)" },
    { "void", "setLyricEvents(int)", "setLyricEvents(int i)" },
    { "void", "setCurrentSong(int)", "setCurrentSong(int i)" },
    { "void", "setActiveCollection(int)", "setActiveCollection(int i)" },
    { "void", "setCollectionPlayMode(int)", "setCollectionPlayMode(int i)" },
    { "void", "setMidiDevice(int)", "setMidiDevice(int i)" },
    { 0, 0, 0 }
};
static const int KMidIface_ftable_hiddens[18] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KMidIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KMidIface_fhash, true, false );
	for ( int i = 0; KMidIface_ftable[i][1]; i++ )
	    fdict->insert( KMidIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // int openURL(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << openURL(arg0 );
    } break;
    case 1: { // void play()
	replyType = KMidIface_ftable[1][0]; 
	play( );
    } break;
    case 2: { // void pause()
	replyType = KMidIface_ftable[2][0]; 
	pause( );
    } break;
    case 3: { // void stop()
	replyType = KMidIface_ftable[3][0]; 
	stop( );
    } break;
    case 4: { // void rewind()
	replyType = KMidIface_ftable[4][0]; 
	rewind( );
    } break;
    case 5: { // void forward()
	replyType = KMidIface_ftable[5][0]; 
	forward( );
    } break;
    case 6: { // void seek(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[6][0]; 
	seek(arg0 );
    } break;
    case 7: { // void prevSong()
	replyType = KMidIface_ftable[7][0]; 
	prevSong( );
    } break;
    case 8: { // void nextSong()
	replyType = KMidIface_ftable[8][0]; 
	nextSong( );
    } break;
    case 9: { // void setSongLoop(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[9][0]; 
	setSongLoop(arg0 );
    } break;
    case 10: { // void setVolume(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[10][0]; 
	setVolume(arg0 );
    } break;
    case 11: { // void setTempo(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[11][0]; 
	setTempo(arg0 );
    } break;
    case 12: { // void setSongEncoding(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[12][0]; 
	setSongEncoding(arg0 );
    } break;
    case 13: { // void setLyricEvents(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[13][0]; 
	setLyricEvents(arg0 );
    } break;
    case 14: { // void setCurrentSong(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[14][0]; 
	setCurrentSong(arg0 );
    } break;
    case 15: { // void setActiveCollection(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[15][0]; 
	setActiveCollection(arg0 );
    } break;
    case 16: { // void setCollectionPlayMode(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[16][0]; 
	setCollectionPlayMode(arg0 );
    } break;
    case 17: { // void setMidiDevice(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMidIface_ftable[17][0]; 
	setMidiDevice(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


