/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from dcopiface.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/noatun/modules/dcopiface/dcopiface.h"

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


static const int NIF_fhash = 37;
static const char* const NIF_ftable[36][3] = {
    { "void", "toggleListView()", "toggleListView()" },
    { "void", "handleButtons()", "handleButtons()" },
    { "void", "removeCurrent()", "removeCurrent()" },
    { "void", "back()", "back()" },
    { "void", "stop()", "stop()" },
    { "void", "play()", "play()" },
    { "void", "playpause()", "playpause()" },
    { "void", "forward()", "forward()" },
    { "void", "skipTo(int)", "skipTo(int)" },
    { "void", "loop()", "loop()" },
    { "void", "setVolume(int)", "setVolume(int)" },
    { "int", "volume()", "volume()" },
    { "void", "volumeUp()", "volumeUp()" },
    { "void", "volumeDown()", "volumeDown()" },
    { "void", "toggleMute()", "toggleMute()" },
    { "int", "length()", "length()" },
    { "int", "position()", "position()" },
    { "int", "state()", "state()" },
    { "TQString", "lengthString()", "lengthString()" },
    { "TQString", "timeString()", "timeString()" },
    { "TQString", "title()", "title()" },
    { "void", "setCurrentProperty(TQString,TQString)", "setCurrentProperty(TQString key,TQString value)" },
    { "TQString", "currentProperty(TQString)", "currentProperty(TQString key)" },
    { "void", "clearCurrentProperty(TQString)", "clearCurrentProperty(TQString key)" },
    { "TQCString", "visStack()", "visStack()" },
    { "TQCString", "session()", "session()" },
    { "void", "addFile(TQString,bool)", "addFile(TQString f,bool autoplay)" },
    { "void", "addFile(TQStringList,bool)", "addFile(TQStringList f,bool autoplay)" },
    { "void", "loadPlugin(TQString)", "loadPlugin(TQString specFile)" },
    { "TQStringList", "availablePlugins()", "availablePlugins()" },
    { "TQStringList", "loadedPlugins()", "loadedPlugins()" },
    { "bool", "unloadPlugin(TQString)", "unloadPlugin(TQString specFile)" },
    { "TQStringList", "mimeTypes()", "mimeTypes()" },
    { "TQCString", "version()", "version()" },
    { "void", "clear()", "clear()" },
    { 0, 0, 0 }
};
static const int NIF_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 NIF::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( NIF_fhash, true, false );
	for ( int i = 0; NIF_ftable[i][1]; i++ )
	    fdict->insert( NIF_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void toggleListView()
	replyType = NIF_ftable[0][0]; 
	toggleListView( );
    } break;
    case 1: { // void handleButtons()
	replyType = NIF_ftable[1][0]; 
	handleButtons( );
    } break;
    case 2: { // void removeCurrent()
	replyType = NIF_ftable[2][0]; 
	removeCurrent( );
    } break;
    case 3: { // void back()
	replyType = NIF_ftable[3][0]; 
	back( );
    } break;
    case 4: { // void stop()
	replyType = NIF_ftable[4][0]; 
	stop( );
    } break;
    case 5: { // void play()
	replyType = NIF_ftable[5][0]; 
	play( );
    } break;
    case 6: { // void playpause()
	replyType = NIF_ftable[6][0]; 
	playpause( );
    } break;
    case 7: { // void forward()
	replyType = NIF_ftable[7][0]; 
	forward( );
    } break;
    case 8: { // void skipTo(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = NIF_ftable[8][0]; 
	skipTo(arg0 );
    } break;
    case 9: { // void loop()
	replyType = NIF_ftable[9][0]; 
	loop( );
    } break;
    case 10: { // void setVolume(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = NIF_ftable[10][0]; 
	setVolume(arg0 );
    } break;
    case 11: { // int volume()
	replyType = NIF_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << volume( );
    } break;
    case 12: { // void volumeUp()
	replyType = NIF_ftable[12][0]; 
	volumeUp( );
    } break;
    case 13: { // void volumeDown()
	replyType = NIF_ftable[13][0]; 
	volumeDown( );
    } break;
    case 14: { // void toggleMute()
	replyType = NIF_ftable[14][0]; 
	toggleMute( );
    } break;
    case 15: { // int length()
	replyType = NIF_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << length( );
    } break;
    case 16: { // int position()
	replyType = NIF_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << position( );
    } break;
    case 17: { // int state()
	replyType = NIF_ftable[17][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << state( );
    } break;
    case 18: { // TQString lengthString()
	replyType = NIF_ftable[18][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << lengthString( );
    } break;
    case 19: { // TQString timeString()
	replyType = NIF_ftable[19][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << timeString( );
    } break;
    case 20: { // TQString title()
	replyType = NIF_ftable[20][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << title( );
    } break;
    case 21: { // void setCurrentProperty(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 = NIF_ftable[21][0]; 
	setCurrentProperty(arg0, arg1 );
    } break;
    case 22: { // TQString currentProperty(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = NIF_ftable[22][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentProperty(arg0 );
    } break;
    case 23: { // void clearCurrentProperty(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = NIF_ftable[23][0]; 
	clearCurrentProperty(arg0 );
    } break;
    case 24: { // TQCString visStack()
	replyType = NIF_ftable[24][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << visStack( );
    } break;
    case 25: { // TQCString session()
	replyType = NIF_ftable[25][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << session( );
    } break;
    case 26: { // void addFile(TQString,bool)
	TQString arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = NIF_ftable[26][0]; 
	addFile(arg0, arg1 );
    } break;
    case 27: { // void addFile(TQStringList,bool)
	TQStringList arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = NIF_ftable[27][0]; 
	addFile(arg0, arg1 );
    } break;
    case 28: { // void loadPlugin(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = NIF_ftable[28][0]; 
	loadPlugin(arg0 );
    } break;
    case 29: { // TQStringList availablePlugins()
	replyType = NIF_ftable[29][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << availablePlugins( );
    } break;
    case 30: { // TQStringList loadedPlugins()
	replyType = NIF_ftable[30][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << loadedPlugins( );
    } break;
    case 31: { // bool unloadPlugin(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = NIF_ftable[31][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << unloadPlugin(arg0 );
    } break;
    case 32: { // TQStringList mimeTypes()
	replyType = NIF_ftable[32][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mimeTypes( );
    } break;
    case 33: { // TQCString version()
	replyType = NIF_ftable[33][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << version( );
    } break;
    case 34: { // void clear()
	replyType = NIF_ftable[34][0]; 
	clear( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


