/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from kmixIface.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/kmix/kmixIface.h"

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


static const int KMixIface_fhash = 17;
static const char* const KMixIface_ftable[15][3] = {
    { "void", "setVolume(int)", "setVolume(int percentage)" },
    { "void", "increaseVolume(int)", "increaseVolume(int percentage)" },
    { "void", "decreaseVolume(int)", "decreaseVolume(int percentage)" },
    { "int", "volume()", "volume()" },
    { "void", "setAbsoluteVolume(long int)", "setAbsoluteVolume(long int absoluteVolume)" },
    { "long int", "absoluteVolume()", "absoluteVolume()" },
    { "long int", "absoluteVolumeMin()", "absoluteVolumeMin()" },
    { "long int", "absoluteVolumeMax()", "absoluteVolumeMax()" },
    { "void", "setMute(bool)", "setMute(bool on)" },
    { "void", "toggleMute()", "toggleMute()" },
    { "bool", "mute()", "mute()" },
    { "TQString", "mixerName()", "mixerName()" },
    { "int", "deviceIndex()", "deviceIndex()" },
    { "void", "setBalance(int)", "setBalance(int balance)" },
    { 0, 0, 0 }
};
static const int KMixIface_ftable_hiddens[14] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KMixIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KMixIface_fhash, true, false );
	for ( int i = 0; KMixIface_ftable[i][1]; i++ )
	    fdict->insert( KMixIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void setVolume(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMixIface_ftable[0][0]; 
	setVolume(arg0 );
    } break;
    case 1: { // void increaseVolume(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMixIface_ftable[1][0]; 
	increaseVolume(arg0 );
    } break;
    case 2: { // void decreaseVolume(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMixIface_ftable[2][0]; 
	decreaseVolume(arg0 );
    } break;
    case 3: { // int volume()
	replyType = KMixIface_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << volume( );
    } break;
    case 4: { // void setAbsoluteVolume(long int)
	long int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMixIface_ftable[4][0]; 
	setAbsoluteVolume(arg0 );
    } break;
    case 5: { // long int absoluteVolume()
	replyType = KMixIface_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << absoluteVolume( );
    } break;
    case 6: { // long int absoluteVolumeMin()
	replyType = KMixIface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << absoluteVolumeMin( );
    } break;
    case 7: { // long int absoluteVolumeMax()
	replyType = KMixIface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << absoluteVolumeMax( );
    } break;
    case 8: { // void setMute(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMixIface_ftable[8][0]; 
	setMute(arg0 );
    } break;
    case 9: { // void toggleMute()
	replyType = KMixIface_ftable[9][0]; 
	toggleMute( );
    } break;
    case 10: { // bool mute()
	replyType = KMixIface_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mute( );
    } break;
    case 11: { // TQString mixerName()
	replyType = KMixIface_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mixerName( );
    } break;
    case 12: { // int deviceIndex()
	replyType = KMixIface_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << deviceIndex( );
    } break;
    case 13: { // void setBalance(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMixIface_ftable[13][0]; 
	setBalance(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


