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

#include <kdatastream.h>


static const char* const Klipper_ftable[3][3] = {
    { "int", "newInstance()", "newInstance()" },
    { "void", "quitProcess()", "quitProcess()" },
    { 0, 0, 0 }
};
static const int Klipper_ftable_hiddens[2] = {
    0,
    0,
};

bool Klipper::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == Klipper_ftable[0][1] ) { // int newInstance()
	replyType = Klipper_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << newInstance( );
    } else if ( fun == Klipper_ftable[1][1] ) { // void quitProcess()
	replyType = Klipper_ftable[1][0]; 
	quitProcess( );
    } else {
	return KlipperWidget::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList Klipper::interfaces()
{
    QCStringList ifaces = KlipperWidget::interfaces();
    ifaces += "Klipper";
    return ifaces;
}

QCStringList Klipper::functions()
{
    QCStringList funcs = KlipperWidget::functions();
    for ( int i = 0; Klipper_ftable[i][2]; i++ ) {
	if (Klipper_ftable_hiddens[i])
	    continue;
	TQCString func = Klipper_ftable[i][0];
	func += ' ';
	func += Klipper_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


#include <kdatastream.h>


static const char* const KlipperWidget_ftable[7][3] = {
    { "TQString", "getClipboardContents()", "getClipboardContents()" },
    { "void", "setClipboardContents(TQString)", "setClipboardContents(TQString s)" },
    { "void", "clearClipboardContents()", "clearClipboardContents()" },
    { "void", "clearClipboardHistory()", "clearClipboardHistory()" },
    { "TQStringList", "getClipboardHistoryMenu()", "getClipboardHistoryMenu()" },
    { "TQString", "getClipboardHistoryItem(int)", "getClipboardHistoryItem(int i)" },
    { 0, 0, 0 }
};
static const int KlipperWidget_ftable_hiddens[6] = {
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KlipperWidget::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KlipperWidget_ftable[0][1] ) { // TQString getClipboardContents()
	replyType = KlipperWidget_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getClipboardContents( );
    } else if ( fun == KlipperWidget_ftable[1][1] ) { // void setClipboardContents(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KlipperWidget_ftable[1][0]; 
	setClipboardContents(arg0 );
    } else if ( fun == KlipperWidget_ftable[2][1] ) { // void clearClipboardContents()
	replyType = KlipperWidget_ftable[2][0]; 
	clearClipboardContents( );
    } else if ( fun == KlipperWidget_ftable[3][1] ) { // void clearClipboardHistory()
	replyType = KlipperWidget_ftable[3][0]; 
	clearClipboardHistory( );
    } else if ( fun == KlipperWidget_ftable[4][1] ) { // TQStringList getClipboardHistoryMenu()
	replyType = KlipperWidget_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getClipboardHistoryMenu( );
    } else if ( fun == KlipperWidget_ftable[5][1] ) { // TQString getClipboardHistoryItem(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KlipperWidget_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getClipboardHistoryItem(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


