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

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-k3b/src/k3b-trinity-14.1.6/src/k3baudioprojectinterface.h"

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


static const int K3bAudioProjectInterface_fhash = 11;
static const char* const K3bAudioProjectInterface_ftable[10][3] = {
    { "int", "trackCount()", "trackCount()" },
    { "TQString", "title()", "title()" },
    { "TQString", "artist()", "artist()" },
    { "TQString", "trackTitle(int)", "trackTitle(int trackNum)" },
    { "TQString", "trackArtist(int)", "trackArtist(int trackNum)" },
    { "void", "setTitle(TQString)", "setTitle(TQString title)" },
    { "void", "setArtist(TQString)", "setArtist(TQString artist)" },
    { "void", "setTrackTitle(int,TQString)", "setTrackTitle(int trackNum,TQString title)" },
    { "void", "setTrackArtist(int,TQString)", "setTrackArtist(int trackNum,TQString artist)" },
    { 0, 0, 0 }
};
static const int K3bAudioProjectInterface_ftable_hiddens[9] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool K3bAudioProjectInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( K3bAudioProjectInterface_fhash, true, false );
	for ( int i = 0; K3bAudioProjectInterface_ftable[i][1]; i++ )
	    fdict->insert( K3bAudioProjectInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // int trackCount()
	replyType = K3bAudioProjectInterface_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << trackCount( );
    } break;
    case 1: { // TQString title()
	replyType = K3bAudioProjectInterface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << title( );
    } break;
    case 2: { // TQString artist()
	replyType = K3bAudioProjectInterface_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << artist( );
    } break;
    case 3: { // TQString trackTitle(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = K3bAudioProjectInterface_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << trackTitle(arg0 );
    } break;
    case 4: { // TQString trackArtist(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = K3bAudioProjectInterface_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << trackArtist(arg0 );
    } break;
    case 5: { // void setTitle(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = K3bAudioProjectInterface_ftable[5][0]; 
	setTitle(arg0 );
    } break;
    case 6: { // void setArtist(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = K3bAudioProjectInterface_ftable[6][0]; 
	setArtist(arg0 );
    } break;
    case 7: { // void setTrackTitle(int,TQString)
	int arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = K3bAudioProjectInterface_ftable[7][0]; 
	setTrackTitle(arg0, arg1 );
    } break;
    case 8: { // void setTrackArtist(int,TQString)
	int arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = K3bAudioProjectInterface_ftable[8][0]; 
	setTrackArtist(arg0, arg1 );
    } break;
    default: 
	return K3bProjectInterface::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList K3bAudioProjectInterface::interfaces()
{
    QCStringList ifaces = K3bProjectInterface::interfaces();
    ifaces += "K3bAudioProjectInterface";
    return ifaces;
}

QCStringList K3bAudioProjectInterface::functions()
{
    QCStringList funcs = K3bProjectInterface::functions();
    for ( int i = 0; K3bAudioProjectInterface_ftable[i][2]; i++ ) {
	if (K3bAudioProjectInterface_ftable_hiddens[i])
	    continue;
	TQCString func = K3bAudioProjectInterface_ftable[i][0];
	func += ' ';
	func += K3bAudioProjectInterface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


