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

#include "/usr/src/ports/kdebase3/kdebase3-3.5.10-11.i686/src/kdebase-3.5.10/konsole/konsole/konsoleiface.h"

#include <kdatastream.h>
#include <qasciidict.h>


static const int KonsoleIface_fhash = 17;
static const char* const KonsoleIface_ftable[14][3] = {
    { "int", "sessionCount()", "sessionCount()" },
    { "QString", "currentSession()", "currentSession()" },
    { "QString", "newSession()", "newSession()" },
    { "QString", "newSession(QString)", "newSession(QString type)" },
    { "QString", "sessionId(int)", "sessionId(int position)" },
    { "void", "activateSession(QString)", "activateSession(QString sessionId)" },
    { "void", "nextSession()", "nextSession()" },
    { "void", "prevSession()", "prevSession()" },
    { "void", "moveSessionLeft()", "moveSessionLeft()" },
    { "void", "moveSessionRight()", "moveSessionRight()" },
    { "bool", "fullScreen()", "fullScreen()" },
    { "void", "setFullScreen(bool)", "setFullScreen(bool on)" },
    { "ASYNC", "reparseConfiguration()", "reparseConfiguration()" },
    { 0, 0, 0 }
};
static const int KonsoleIface_ftable_hiddens[13] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KonsoleIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    static QAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new QAsciiDict<int>( KonsoleIface_fhash, true, false );
	for ( int i = 0; KonsoleIface_ftable[i][1]; i++ )
	    fdict->insert( KonsoleIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // int sessionCount()
	replyType = KonsoleIface_ftable[0][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sessionCount( );
    } break;
    case 1: { // QString currentSession()
	replyType = KonsoleIface_ftable[1][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentSession( );
    } break;
    case 2: { // QString newSession()
	replyType = KonsoleIface_ftable[2][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << newSession( );
    } break;
    case 3: { // QString newSession(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonsoleIface_ftable[3][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << newSession(arg0 );
    } break;
    case 4: { // QString sessionId(int)
	int arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonsoleIface_ftable[4][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sessionId(arg0 );
    } break;
    case 5: { // void activateSession(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonsoleIface_ftable[5][0]; 
	activateSession(arg0 );
    } break;
    case 6: { // void nextSession()
	replyType = KonsoleIface_ftable[6][0]; 
	nextSession( );
    } break;
    case 7: { // void prevSession()
	replyType = KonsoleIface_ftable[7][0]; 
	prevSession( );
    } break;
    case 8: { // void moveSessionLeft()
	replyType = KonsoleIface_ftable[8][0]; 
	moveSessionLeft( );
    } break;
    case 9: { // void moveSessionRight()
	replyType = KonsoleIface_ftable[9][0]; 
	moveSessionRight( );
    } break;
    case 10: { // bool fullScreen()
	replyType = KonsoleIface_ftable[10][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << fullScreen( );
    } break;
    case 11: { // void setFullScreen(bool)
	bool arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonsoleIface_ftable[11][0]; 
	setFullScreen(arg0 );
    } break;
    case 12: { // void reparseConfiguration()
	replyType = KonsoleIface_ftable[12][0]; 
	reparseConfiguration( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

QCStringList KonsoleIface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; KonsoleIface_ftable[i][2]; i++ ) {
	if (KonsoleIface_ftable_hiddens[i])
	    continue;
	QCString func = KonsoleIface_ftable[i][0];
	func += ' ';
	func += KonsoleIface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


