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

#include "/tmp/buildd/tde-packaging/arch/tde-base/tde-tdegraphics/src/tdegraphics-trinity-14.1.6/ksnapshot/ksnapshotiface.h"

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


static const int KSnapshotIface_fhash = 17;
static const char* const KSnapshotIface_ftable[16][3] = {
    { "TQString", "url()", "url()" },
    { "void", "slotGrab()", "slotGrab()" },
    { "void", "slotPrint()", "slotPrint()" },
    { "void", "slotSave()", "slotSave()" },
    { "bool", "save(TQString)", "save(TQString filename)" },
    { "void", "slotSaveAs()", "slotSaveAs()" },
    { "void", "slotCopy()", "slotCopy()" },
    { "void", "setTime(int)", "setTime(int newTime)" },
    { "int", "timeout()", "timeout()" },
    { "void", "setURL(TQString)", "setURL(TQString newURL)" },
    { "void", "setGrabMode(int)", "setGrabMode(int grab)" },
    { "int", "grabMode()", "grabMode()" },
    { "void", "slotMovePointer(int,int)", "slotMovePointer(int x,int y)" },
    { "void", "exit()", "exit()" },
    { "void", "setPixmap(TQPixmap)", "setPixmap(TQPixmap newImage)" },
    { 0, 0, 0 }
};
static const int KSnapshotIface_ftable_hiddens[15] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KSnapshotIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KSnapshotIface_fhash, true, false );
	for ( int i = 0; KSnapshotIface_ftable[i][1]; i++ )
	    fdict->insert( KSnapshotIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // TQString url()
	replyType = KSnapshotIface_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << url( );
    } break;
    case 1: { // void slotGrab()
	replyType = KSnapshotIface_ftable[1][0]; 
	slotGrab( );
    } break;
    case 2: { // void slotPrint()
	replyType = KSnapshotIface_ftable[2][0]; 
	slotPrint( );
    } break;
    case 3: { // void slotSave()
	replyType = KSnapshotIface_ftable[3][0]; 
	slotSave( );
    } break;
    case 4: { // bool save(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSnapshotIface_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << save(arg0 );
    } break;
    case 5: { // void slotSaveAs()
	replyType = KSnapshotIface_ftable[5][0]; 
	slotSaveAs( );
    } break;
    case 6: { // void slotCopy()
	replyType = KSnapshotIface_ftable[6][0]; 
	slotCopy( );
    } break;
    case 7: { // void setTime(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSnapshotIface_ftable[7][0]; 
	setTime(arg0 );
    } break;
    case 8: { // int timeout()
	replyType = KSnapshotIface_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << timeout( );
    } break;
    case 9: { // void setURL(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSnapshotIface_ftable[9][0]; 
	setURL(arg0 );
    } break;
    case 10: { // void setGrabMode(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSnapshotIface_ftable[10][0]; 
	setGrabMode(arg0 );
    } break;
    case 11: { // int grabMode()
	replyType = KSnapshotIface_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << grabMode( );
    } break;
    case 12: { // void slotMovePointer(int,int)
	int arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSnapshotIface_ftable[12][0]; 
	slotMovePointer(arg0, arg1 );
    } break;
    case 13: { // void exit()
	replyType = KSnapshotIface_ftable[13][0]; 
	exit( );
    } break;
    case 14: { // void setPixmap(TQPixmap)
	TQPixmap arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSnapshotIface_ftable[14][0]; 
	setPixmap(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


