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

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


static const int K3bProjectInterface_fhash = 11;
static const char* const K3bProjectInterface_ftable[10][3] = {
    { "void", "addUrls(TQStringList)", "addUrls(TQStringList urls)" },
    { "void", "addUrl(TQString)", "addUrl(TQString url)" },
    { "void", "burn()", "burn()" },
    { "bool", "directBurn()", "directBurn()" },
    { "void", "setBurnDevice(TQString)", "setBurnDevice(TQString blockdevicename)" },
    { "int", "length()", "length()" },
    { "TDEIO::filesize_t", "size()", "size()" },
    { "TQString", "imagePath()", "imagePath()" },
    { "TQString", "projectType()", "projectType()" },
    { 0, 0, 0 }
};
static const int K3bProjectInterface_ftable_hiddens[9] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool K3bProjectInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( K3bProjectInterface_fhash, true, false );
	for ( int i = 0; K3bProjectInterface_ftable[i][1]; i++ )
	    fdict->insert( K3bProjectInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void addUrls(TQStringList)
	TQStringList arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = K3bProjectInterface_ftable[0][0]; 
	addUrls(arg0 );
    } break;
    case 1: { // void addUrl(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = K3bProjectInterface_ftable[1][0]; 
	addUrl(arg0 );
    } break;
    case 2: { // void burn()
	replyType = K3bProjectInterface_ftable[2][0]; 
	burn( );
    } break;
    case 3: { // bool directBurn()
	replyType = K3bProjectInterface_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << directBurn( );
    } break;
    case 4: { // void setBurnDevice(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = K3bProjectInterface_ftable[4][0]; 
	setBurnDevice(arg0 );
    } break;
    case 5: { // int length()
	replyType = K3bProjectInterface_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << length( );
    } break;
    case 6: { // TDEIO::filesize_t size()
	replyType = K3bProjectInterface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << size( );
    } break;
    case 7: { // TQString imagePath()
	replyType = K3bProjectInterface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << imagePath( );
    } break;
    case 8: { // TQString projectType()
	replyType = K3bProjectInterface_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << projectType( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


