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

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


static const int MixerIface_fhash = 29;
static const char* const MixerIface_ftable[25][3] = {
    { "void", "setVolume(int,int)", "setVolume(int deviceidx,int percentage)" },
    { "void", "setMasterVolume(int)", "setMasterVolume(int percentage)" },
    { "void", "increaseVolume(int,int)", "increaseVolume(int deviceidx,int percentage)" },
    { "void", "decreaseVolume(int,int)", "decreaseVolume(int deviceidx,int percentage)" },
    { "int", "volume(int)", "volume(int deviceidx)" },
    { "int", "masterVolume()", "masterVolume()" },
    { "void", "setAbsoluteVolume(int,long int)", "setAbsoluteVolume(int deviceidx,long int absoluteVolume)" },
    { "long int", "absoluteVolume(int)", "absoluteVolume(int deviceidx)" },
    { "long int", "absoluteVolumeMin(int)", "absoluteVolumeMin(int deviceidx)" },
    { "long int", "absoluteVolumeMax(int)", "absoluteVolumeMax(int deviceidx)" },
    { "void", "setMute(int,bool)", "setMute(int deviceidx,bool on)" },
    { "void", "setMasterMute(bool)", "setMasterMute(bool on)" },
    { "void", "toggleMute(int)", "toggleMute(int deviceidx)" },
    { "void", "toggleMasterMute()", "toggleMasterMute()" },
    { "bool", "mute(int)", "mute(int deviceidx)" },
    { "bool", "masterMute()", "masterMute()" },
    { "int", "masterDeviceIndex()", "masterDeviceIndex()" },
    { "void", "setRecordSource(int,bool)", "setRecordSource(int deviceidx,bool on)" },
    { "bool", "isRecordSource(int)", "isRecordSource(int deviceidx)" },
    { "void", "setBalance(int)", "setBalance(int balance)" },
    { "bool", "isAvailableDevice(int)", "isAvailableDevice(int deviceidx)" },
    { "TQString", "mixerName()", "mixerName()" },
    { "int", "open()", "open()" },
    { "int", "close()", "close()" },
    { 0, 0, 0 }
};
static const int MixerIface_ftable_hiddens[24] = {
    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 MixerIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( MixerIface_fhash, true, false );
	for ( int i = 0; MixerIface_ftable[i][1]; i++ )
	    fdict->insert( MixerIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void setVolume(int,int)
	int arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MixerIface_ftable[0][0]; 
	setVolume(arg0, arg1 );
    } break;
    case 1: { // void setMasterVolume(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[1][0]; 
	setMasterVolume(arg0 );
    } break;
    case 2: { // void increaseVolume(int,int)
	int arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MixerIface_ftable[2][0]; 
	increaseVolume(arg0, arg1 );
    } break;
    case 3: { // void decreaseVolume(int,int)
	int arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MixerIface_ftable[3][0]; 
	decreaseVolume(arg0, arg1 );
    } break;
    case 4: { // int volume(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << volume(arg0 );
    } break;
    case 5: { // int masterVolume()
	replyType = MixerIface_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << masterVolume( );
    } break;
    case 6: { // void setAbsoluteVolume(int,long int)
	int arg0;
	long int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MixerIface_ftable[6][0]; 
	setAbsoluteVolume(arg0, arg1 );
    } break;
    case 7: { // long int absoluteVolume(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << absoluteVolume(arg0 );
    } break;
    case 8: { // long int absoluteVolumeMin(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << absoluteVolumeMin(arg0 );
    } break;
    case 9: { // long int absoluteVolumeMax(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << absoluteVolumeMax(arg0 );
    } break;
    case 10: { // void setMute(int,bool)
	int arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MixerIface_ftable[10][0]; 
	setMute(arg0, arg1 );
    } break;
    case 11: { // void setMasterMute(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[11][0]; 
	setMasterMute(arg0 );
    } break;
    case 12: { // void toggleMute(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[12][0]; 
	toggleMute(arg0 );
    } break;
    case 13: { // void toggleMasterMute()
	replyType = MixerIface_ftable[13][0]; 
	toggleMasterMute( );
    } break;
    case 14: { // bool mute(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mute(arg0 );
    } break;
    case 15: { // bool masterMute()
	replyType = MixerIface_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << masterMute( );
    } break;
    case 16: { // int masterDeviceIndex()
	replyType = MixerIface_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << masterDeviceIndex( );
    } break;
    case 17: { // void setRecordSource(int,bool)
	int arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MixerIface_ftable[17][0]; 
	setRecordSource(arg0, arg1 );
    } break;
    case 18: { // bool isRecordSource(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[18][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isRecordSource(arg0 );
    } break;
    case 19: { // void setBalance(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[19][0]; 
	setBalance(arg0 );
    } break;
    case 20: { // bool isAvailableDevice(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MixerIface_ftable[20][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isAvailableDevice(arg0 );
    } break;
    case 21: { // TQString mixerName()
	replyType = MixerIface_ftable[21][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mixerName( );
    } break;
    case 22: { // int open()
	replyType = MixerIface_ftable[22][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << open( );
    } break;
    case 23: { // int close()
	replyType = MixerIface_ftable[23][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << close( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


