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

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


static const int SessionIface_fhash = 17;
static const char* const SessionIface_ftable[17][3] = {
    { "bool", "closeSession()", "closeSession()" },
    { "bool", "sendSignal(int)", "sendSignal(int signal)" },
    { "void", "clearHistory()", "clearHistory()" },
    { "void", "renameSession(QString)", "renameSession(QString name)" },
    { "QString", "sessionName()", "sessionName()" },
    { "int", "sessionPID()", "sessionPID()" },
    { "QString", "schema()", "schema()" },
    { "void", "setSchema(QString)", "setSchema(QString schema)" },
    { "QString", "encoding()", "encoding()" },
    { "void", "setEncoding(QString)", "setEncoding(QString encoding)" },
    { "QString", "keytab()", "keytab()" },
    { "void", "setKeytab(QString)", "setKeytab(QString keyboard)" },
    { "QSize", "size()", "size()" },
    { "void", "setSize(QSize)", "setSize(QSize size)" },
    { "QString", "font()", "font()" },
    { "void", "setFont(QString)", "setFont(QString font)" },
    { 0, 0, 0 }
};
static const int SessionIface_ftable_hiddens[16] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool SessionIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    static QAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new QAsciiDict<int>( SessionIface_fhash, true, false );
	for ( int i = 0; SessionIface_ftable[i][1]; i++ )
	    fdict->insert( SessionIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // bool closeSession()
	replyType = SessionIface_ftable[0][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << closeSession( );
    } break;
    case 1: { // bool sendSignal(int)
	int arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = SessionIface_ftable[1][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sendSignal(arg0 );
    } break;
    case 2: { // void clearHistory()
	replyType = SessionIface_ftable[2][0]; 
	clearHistory( );
    } break;
    case 3: { // void renameSession(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = SessionIface_ftable[3][0]; 
	renameSession(arg0 );
    } break;
    case 4: { // QString sessionName()
	replyType = SessionIface_ftable[4][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sessionName( );
    } break;
    case 5: { // int sessionPID()
	replyType = SessionIface_ftable[5][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sessionPID( );
    } break;
    case 6: { // QString schema()
	replyType = SessionIface_ftable[6][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << schema( );
    } break;
    case 7: { // void setSchema(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = SessionIface_ftable[7][0]; 
	setSchema(arg0 );
    } break;
    case 8: { // QString encoding()
	replyType = SessionIface_ftable[8][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << encoding( );
    } break;
    case 9: { // void setEncoding(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = SessionIface_ftable[9][0]; 
	setEncoding(arg0 );
    } break;
    case 10: { // QString keytab()
	replyType = SessionIface_ftable[10][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << keytab( );
    } break;
    case 11: { // void setKeytab(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = SessionIface_ftable[11][0]; 
	setKeytab(arg0 );
    } break;
    case 12: { // QSize size()
	replyType = SessionIface_ftable[12][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << size( );
    } break;
    case 13: { // void setSize(QSize)
	QSize arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = SessionIface_ftable[13][0]; 
	setSize(arg0 );
    } break;
    case 14: { // QString font()
	replyType = SessionIface_ftable[14][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << font( );
    } break;
    case 15: { // void setFont(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = SessionIface_ftable[15][0]; 
	setFont(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


