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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdebase/src/tdebase-trinity-14.1.6/konqueror/KonqMainWindowIface.h"

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


static const int KonqMainWindowIface_fhash = 17;
static const char* const KonqMainWindowIface_ftable[17][3] = {
    { "void", "openURL(TQString)", "openURL(TQString url)" },
    { "void", "newTab(TQString)", "newTab(TQString url)" },
    { "void", "openURL(TQString,bool)", "openURL(TQString url,bool tempFile)" },
    { "void", "newTab(TQString,bool)", "newTab(TQString url,bool tempFile)" },
    { "void", "newTabASN(TQString,TQCString,bool)", "newTabASN(TQString url,TQCString startup_id,bool tempFile)" },
    { "void", "splitViewHorizontally()", "splitViewHorizontally()" },
    { "void", "splitViewVertically()", "splitViewVertically()" },
    { "void", "reload()", "reload()" },
    { "DCOPRef", "currentView()", "currentView()" },
    { "DCOPRef", "currentPart()", "currentPart()" },
    { "DCOPRef", "view(int)", "view(int viewNumber)" },
    { "DCOPRef", "part(int)", "part(int partNumber)" },
    { "DCOPRef", "action(TQCString)", "action(TQCString name)" },
    { "QCStringList", "actions()", "actions()" },
    { "TQMap<TQCString,DCOPRef>", "actionMap()", "actionMap()" },
    { "bool", "windowCanBeUsedForTab()", "windowCanBeUsedForTab()" },
    { 0, 0, 0 }
};
static const int KonqMainWindowIface_ftable_hiddens[16] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KonqMainWindowIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KonqMainWindowIface_fhash, true, false );
	for ( int i = 0; KonqMainWindowIface_ftable[i][1]; i++ )
	    fdict->insert( KonqMainWindowIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void openURL(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonqMainWindowIface_ftable[0][0]; 
	openURL(arg0 );
    } break;
    case 1: { // void newTab(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonqMainWindowIface_ftable[1][0]; 
	newTab(arg0 );
    } break;
    case 2: { // void openURL(TQString,bool)
	TQString arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KonqMainWindowIface_ftable[2][0]; 
	openURL(arg0, arg1 );
    } break;
    case 3: { // void newTab(TQString,bool)
	TQString arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KonqMainWindowIface_ftable[3][0]; 
	newTab(arg0, arg1 );
    } break;
    case 4: { // void newTabASN(TQString,TQCString,bool)
	TQString arg0;
	TQCString arg1;
	bool 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 = KonqMainWindowIface_ftable[4][0]; 
	newTabASN(arg0, arg1, arg2 );
    } break;
    case 5: { // void splitViewHorizontally()
	replyType = KonqMainWindowIface_ftable[5][0]; 
	splitViewHorizontally( );
    } break;
    case 6: { // void splitViewVertically()
	replyType = KonqMainWindowIface_ftable[6][0]; 
	splitViewVertically( );
    } break;
    case 7: { // void reload()
	replyType = KonqMainWindowIface_ftable[7][0]; 
	reload( );
    } break;
    case 8: { // DCOPRef currentView()
	replyType = KonqMainWindowIface_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentView( );
    } break;
    case 9: { // DCOPRef currentPart()
	replyType = KonqMainWindowIface_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentPart( );
    } break;
    case 10: { // DCOPRef view(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonqMainWindowIface_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << view(arg0 );
    } break;
    case 11: { // DCOPRef part(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonqMainWindowIface_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << part(arg0 );
    } break;
    case 12: { // DCOPRef action(TQCString)
	TQCString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonqMainWindowIface_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << action(arg0 );
    } break;
    case 13: { // QCStringList actions()
	replyType = KonqMainWindowIface_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << actions( );
    } break;
    case 14: { // TQMap<TQCString,DCOPRef> actionMap()
	replyType = KonqMainWindowIface_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << actionMap( );
    } break;
    case 15: { // bool windowCanBeUsedForTab()
	replyType = KonqMainWindowIface_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << windowCanBeUsedForTab( );
    } break;
    default: 
	return TDEMainWindowInterface::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList KonqMainWindowIface::interfaces()
{
    QCStringList ifaces = TDEMainWindowInterface::interfaces();
    ifaces += "KonqMainWindowIface";
    return ifaces;
}

QCStringList KonqMainWindowIface::functions()
{
    QCStringList funcs = TDEMainWindowInterface::functions();
    for ( int i = 0; KonqMainWindowIface_ftable[i][2]; i++ ) {
	if (KonqMainWindowIface_ftable_hiddens[i])
	    continue;
	TQCString func = KonqMainWindowIface_ftable[i][0];
	func += ' ';
	func += KonqMainWindowIface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


