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

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-ktorrent/src/ktorrent-trinity-14.1.6/src/apps/ktorrent/dcopinterface.h"

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


static const int DCOPInterface_fhash = 37;
static const char* const DCOPInterface_ftable[35][3] = {
    { "void", "startAll(int)", "startAll(int type)" },
    { "void", "stopAll(int)", "stopAll(int type)" },
    { "void", "setMaxDownloads(int)", "setMaxDownloads(int max)" },
    { "void", "setMaxSeeds(int)", "setMaxSeeds(int max)" },
    { "void", "setKeepSeeding(bool)", "setKeepSeeding(bool ks)" },
    { "void", "setMaxUploadSpeed(int)", "setMaxUploadSpeed(int kbytes_per_sec)" },
    { "void", "setMaxDownloadSpeed(int)", "setMaxDownloadSpeed(int kbytes_per_sec)" },
    { "void", "setMaxConnectionsPerDownload(int)", "setMaxConnectionsPerDownload(int max)" },
    { "void", "setShowSysTrayIcon(bool)", "setShowSysTrayIcon(bool yes)" },
    { "bool", "changeDataDir(TQString)", "changeDataDir(TQString new_dir)" },
    { "void", "openTorrent(TQString)", "openTorrent(TQString file)" },
    { "void", "openTorrentSilently(TQString)", "openTorrentSilently(TQString file)" },
    { "TQValueList<int>", "getTorrentNumbers(int)", "getTorrentNumbers(int type)" },
    { "QCStringList", "getTorrentInfo(int)", "getTorrentInfo(int tornumber)" },
    { "int", "getFileCount(int)", "getFileCount(int tornumber)" },
    { "QCStringList", "getInfo()", "getInfo()" },
    { "QCStringList", "getFileNames(int)", "getFileNames(int tornumber)" },
    { "TQValueList<int>", "getFilePriorities(int)", "getFilePriorities(int tornumber)" },
    { "void", "setFilePriority(int,int,int)", "setFilePriority(int tornumber,int index,int priority)" },
    { "void", "start(int)", "start(int tornumber)" },
    { "void", "stop(int,bool)", "stop(int tornumber,bool user)" },
    { "void", "remove(int,bool)", "remove(int tornumber,bool del_data)" },
    { "void", "announce(int)", "announce(int tornumber)" },
    { "TQCString", "dataDir()", "dataDir()" },
    { "int", "maxDownloads()", "maxDownloads()" },
    { "int", "maxSeeds()", "maxSeeds()" },
    { "int", "maxConnections()", "maxConnections()" },
    { "int", "maxUploadRate()", "maxUploadRate()" },
    { "int", "maxDownloadRate()", "maxDownloadRate()" },
    { "bool", "keepSeeding()", "keepSeeding()" },
    { "bool", "showSystemTrayIcon()", "showSystemTrayIcon()" },
    { "TQValueList<int>", "intSettings()", "intSettings()" },
    { "bool", "isBlockedIP(TQString)", "isBlockedIP(TQString ip)" },
    { "void", "openTorrentSilentlyDir(TQString,TQString)", "openTorrentSilentlyDir(TQString file,TQString savedir)" },
    { 0, 0, 0 }
};
static const int DCOPInterface_ftable_hiddens[34] = {
    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 DCOPInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( DCOPInterface_fhash, true, false );
	for ( int i = 0; DCOPInterface_ftable[i][1]; i++ )
	    fdict->insert( DCOPInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void startAll(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[0][0]; 
	startAll(arg0 );
    } break;
    case 1: { // void stopAll(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[1][0]; 
	stopAll(arg0 );
    } break;
    case 2: { // void setMaxDownloads(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[2][0]; 
	setMaxDownloads(arg0 );
    } break;
    case 3: { // void setMaxSeeds(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[3][0]; 
	setMaxSeeds(arg0 );
    } break;
    case 4: { // void setKeepSeeding(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[4][0]; 
	setKeepSeeding(arg0 );
    } break;
    case 5: { // void setMaxUploadSpeed(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[5][0]; 
	setMaxUploadSpeed(arg0 );
    } break;
    case 6: { // void setMaxDownloadSpeed(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[6][0]; 
	setMaxDownloadSpeed(arg0 );
    } break;
    case 7: { // void setMaxConnectionsPerDownload(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[7][0]; 
	setMaxConnectionsPerDownload(arg0 );
    } break;
    case 8: { // void setShowSysTrayIcon(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[8][0]; 
	setShowSysTrayIcon(arg0 );
    } break;
    case 9: { // bool changeDataDir(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << changeDataDir(arg0 );
    } break;
    case 10: { // void openTorrent(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[10][0]; 
	openTorrent(arg0 );
    } break;
    case 11: { // void openTorrentSilently(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[11][0]; 
	openTorrentSilently(arg0 );
    } break;
    case 12: { // TQValueList<int> getTorrentNumbers(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTorrentNumbers(arg0 );
    } break;
    case 13: { // QCStringList getTorrentInfo(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTorrentInfo(arg0 );
    } break;
    case 14: { // int getFileCount(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getFileCount(arg0 );
    } break;
    case 15: { // QCStringList getInfo()
	replyType = DCOPInterface_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getInfo( );
    } break;
    case 16: { // QCStringList getFileNames(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getFileNames(arg0 );
    } break;
    case 17: { // TQValueList<int> getFilePriorities(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[17][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getFilePriorities(arg0 );
    } break;
    case 18: { // void setFilePriority(int,int,int)
	int arg0;
	int arg1;
	int arg2;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	replyType = DCOPInterface_ftable[18][0]; 
	setFilePriority(arg0, arg1, arg2 );
    } break;
    case 19: { // void start(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[19][0]; 
	start(arg0 );
    } break;
    case 20: { // void stop(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 = DCOPInterface_ftable[20][0]; 
	stop(arg0, arg1 );
    } break;
    case 21: { // void remove(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 = DCOPInterface_ftable[21][0]; 
	remove(arg0, arg1 );
    } break;
    case 22: { // void announce(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[22][0]; 
	announce(arg0 );
    } break;
    case 23: { // TQCString dataDir()
	replyType = DCOPInterface_ftable[23][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << dataDir( );
    } break;
    case 24: { // int maxDownloads()
	replyType = DCOPInterface_ftable[24][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << maxDownloads( );
    } break;
    case 25: { // int maxSeeds()
	replyType = DCOPInterface_ftable[25][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << maxSeeds( );
    } break;
    case 26: { // int maxConnections()
	replyType = DCOPInterface_ftable[26][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << maxConnections( );
    } break;
    case 27: { // int maxUploadRate()
	replyType = DCOPInterface_ftable[27][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << maxUploadRate( );
    } break;
    case 28: { // int maxDownloadRate()
	replyType = DCOPInterface_ftable[28][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << maxDownloadRate( );
    } break;
    case 29: { // bool keepSeeding()
	replyType = DCOPInterface_ftable[29][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << keepSeeding( );
    } break;
    case 30: { // bool showSystemTrayIcon()
	replyType = DCOPInterface_ftable[30][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << showSystemTrayIcon( );
    } break;
    case 31: { // TQValueList<int> intSettings()
	replyType = DCOPInterface_ftable[31][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << intSettings( );
    } break;
    case 32: { // bool isBlockedIP(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPInterface_ftable[32][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isBlockedIP(arg0 );
    } break;
    case 33: { // void openTorrentSilentlyDir(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 = DCOPInterface_ftable[33][0]; 
	openTorrentSilentlyDir(arg0, arg1 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


