You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kshutdown/kshutdown/kshutdowniface_skel.cpp

136 lines
3.8 KiB

/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from kshutdowniface.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/
#include "kshutdowniface.h"
#include <kdatastream.h>
#include <tqasciidict.h>
static const int KShutdownIface_fhash = 13;
static const char* const KShutdownIface_ftable[12][3] = {
{ "ASYNC", "cancel()", "cancel()" },
{ "bool", "shutDown()", "shutDown()" },
{ "bool", "shutdown()", "shutdown()" },
{ "bool", "reboot()", "reboot()" },
{ "bool", "lockScreen()", "lockScreen()" },
{ "bool", "logout()", "logout()" },
{ "ASYNC", "configure()", "configure()" },
{ "TQString", "getStatusInfo()", "getStatusInfo()" },
{ "void", "makeInvisible()", "makeInvisible()" },
{ "ASYNC", "makeVisible()", "makeVisible()" },
{ "ASYNC", "setTestMode(bool)", "setTestMode(bool yes)" },
{ 0, 0, 0 }
};
static const int KShutdownIface_ftable_hiddens[11] = {
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
};
bool KShutdownIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
static TQAsciiDict<int>* fdict = 0;
if ( !fdict ) {
fdict = new TQAsciiDict<int>( KShutdownIface_fhash, true, false );
for ( int i = 0; KShutdownIface_ftable[i][1]; i++ )
fdict->insert( KShutdownIface_ftable[i][1], new int( i ) );
}
int* fp = fdict->find( fun );
switch ( fp?*fp:-1) {
case 0: { // void cancel()
replyType = KShutdownIface_ftable[0][0];
cancel( );
} break;
case 1: { // bool shutDown()
replyType = KShutdownIface_ftable[1][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << shutDown( );
} break;
case 2: { // bool shutdown()
replyType = KShutdownIface_ftable[2][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << shutdown( );
} break;
case 3: { // bool reboot()
replyType = KShutdownIface_ftable[3][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << reboot( );
} break;
case 4: { // bool lockScreen()
replyType = KShutdownIface_ftable[4][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << lockScreen( );
} break;
case 5: { // bool logout()
replyType = KShutdownIface_ftable[5][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << logout( );
} break;
case 6: { // void configure()
replyType = KShutdownIface_ftable[6][0];
configure( );
} break;
case 7: { // TQString getStatusInfo()
replyType = KShutdownIface_ftable[7][0];
TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << getStatusInfo( );
} break;
case 8: { // void makeInvisible()
replyType = KShutdownIface_ftable[8][0];
makeInvisible( );
} break;
case 9: { // void makeVisible()
replyType = KShutdownIface_ftable[9][0];
makeVisible( );
} break;
case 10: { // void setTestMode(bool)
bool arg0;
TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = KShutdownIface_ftable[10][0];
setTestMode(arg0 );
} break;
default:
return DCOPObject::process( fun, data, replyType, replyData );
}
return true;
}
QCStringList KShutdownIface::interfaces()
{
QCStringList ifaces = DCOPObject::interfaces();
ifaces += "KShutdownIface";
return ifaces;
}
QCStringList KShutdownIface::functions()
{
QCStringList funcs = DCOPObject::functions();
for ( int i = 0; KShutdownIface_ftable[i][2]; i++ ) {
if (KShutdownIface_ftable_hiddens[i])
continue;
TQCString func = KShutdownIface_ftable[i][0];
func += ' ';
func += KShutdownIface_ftable[i][2];
funcs << func;
}
return funcs;
}