diff --git a/kshutdown/CMakeLists.txt b/kshutdown/CMakeLists.txt index c18e820..6672c41 100644 --- a/kshutdown/CMakeLists.txt +++ b/kshutdown/CMakeLists.txt @@ -22,7 +22,7 @@ tde_add_executable( ${PROJECT_NAME} AUTOMOC configuration.cpp confirmation.cpp extras.cpp - kshutdowniface_skel.cpp + kshutdowniface.skel links.cpp mactioneditdialog.cpp main.cpp diff --git a/kshutdown/kshutdowniface.kidl b/kshutdown/kshutdowniface.kidl deleted file mode 100644 index 0ae6497..0000000 --- a/kshutdown/kshutdowniface.kidl +++ /dev/null @@ -1,53 +0,0 @@ - -kshutdowniface.h -dcopobject.h - - KShutdownIface - DCOPObject - - ASYNC - cancel - - - bool - shutDown - - - bool - shutdown - - - bool - reboot - - - bool - lockScreen - - - bool - logout - - - ASYNC - configure - - - QString - getStatusInfo - - - void - makeInvisible - - - ASYNC - makeVisible - - - ASYNC - setTestMode - boolyes - - - diff --git a/kshutdown/kshutdowniface_skel.cpp b/kshutdown/kshutdowniface_skel.cpp deleted file mode 100644 index 9201637..0000000 --- a/kshutdown/kshutdowniface_skel.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** -** -** DCOP Skeleton generated by dcopidl2cpp from kshutdowniface.kidl -** -** WARNING! All changes made in this file will be lost! -** -*****************************************************************************/ - -#include "kshutdowniface.h" - -#include -#include - - -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* fdict = 0; - if ( !fdict ) { - fdict = new TQAsciiDict( 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; -} - - diff --git a/kshutdown/kshutdowniface_stub.cpp b/kshutdown/kshutdowniface_stub.cpp deleted file mode 100644 index b94de1d..0000000 --- a/kshutdown/kshutdowniface_stub.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/**************************************************************************** -** -** DCOP Stub Implementation created by dcopidl2cpp from kshutdowniface.kidl -** -** WARNING! All changes made in this file will be lost! -** -*****************************************************************************/ - -#include "kshutdowniface_stub.h" -#include - -#include - - -KShutdownIface_stub::KShutdownIface_stub( const TQCString& app, const TQCString& obj ) - : DCOPStub( app, obj ) -{ -} - -KShutdownIface_stub::KShutdownIface_stub( DCOPClient* client, const TQCString& app, const TQCString& obj ) - : DCOPStub( client, app, obj ) -{ -} - -KShutdownIface_stub::KShutdownIface_stub( const DCOPRef& ref ) - : DCOPStub( ref ) -{ -} - -void KShutdownIface_stub::cancel() -{ - if ( !dcopClient() ) { - setStatus( CallFailed ); - return; - } - TQByteArray data; - dcopClient()->send( app(), obj(), "cancel()", data ); - setStatus( CallSucceeded ); -} - -bool KShutdownIface_stub::shutDown() -{ - bool result = false; - if ( !dcopClient() ) { - setStatus( CallFailed ); - return result; - } - TQByteArray data, replyData; - TQCString replyType; - if ( dcopClient()->call( app(), obj(), "shutDown()", data, replyType, replyData ) ) { - if ( replyType == "bool" ) { - TQDataStream _reply_stream( replyData, IO_ReadOnly ); - _reply_stream >> result; - setStatus( CallSucceeded ); - } else { - callFailed(); - } - } else { - callFailed(); - } - return result; -} - -bool KShutdownIface_stub::shutdown() -{ - bool result = false; - if ( !dcopClient() ) { - setStatus( CallFailed ); - return result; - } - TQByteArray data, replyData; - TQCString replyType; - if ( dcopClient()->call( app(), obj(), "shutdown()", data, replyType, replyData ) ) { - if ( replyType == "bool" ) { - TQDataStream _reply_stream( replyData, IO_ReadOnly ); - _reply_stream >> result; - setStatus( CallSucceeded ); - } else { - callFailed(); - } - } else { - callFailed(); - } - return result; -} - -bool KShutdownIface_stub::reboot() -{ - bool result = false; - if ( !dcopClient() ) { - setStatus( CallFailed ); - return result; - } - TQByteArray data, replyData; - TQCString replyType; - if ( dcopClient()->call( app(), obj(), "reboot()", data, replyType, replyData ) ) { - if ( replyType == "bool" ) { - TQDataStream _reply_stream( replyData, IO_ReadOnly ); - _reply_stream >> result; - setStatus( CallSucceeded ); - } else { - callFailed(); - } - } else { - callFailed(); - } - return result; -} - -bool KShutdownIface_stub::lockScreen() -{ - bool result = false; - if ( !dcopClient() ) { - setStatus( CallFailed ); - return result; - } - TQByteArray data, replyData; - TQCString replyType; - if ( dcopClient()->call( app(), obj(), "lockScreen()", data, replyType, replyData ) ) { - if ( replyType == "bool" ) { - TQDataStream _reply_stream( replyData, IO_ReadOnly ); - _reply_stream >> result; - setStatus( CallSucceeded ); - } else { - callFailed(); - } - } else { - callFailed(); - } - return result; -} - -bool KShutdownIface_stub::logout() -{ - bool result = false; - if ( !dcopClient() ) { - setStatus( CallFailed ); - return result; - } - TQByteArray data, replyData; - TQCString replyType; - if ( dcopClient()->call( app(), obj(), "logout()", data, replyType, replyData ) ) { - if ( replyType == "bool" ) { - TQDataStream _reply_stream( replyData, IO_ReadOnly ); - _reply_stream >> result; - setStatus( CallSucceeded ); - } else { - callFailed(); - } - } else { - callFailed(); - } - return result; -} - -void KShutdownIface_stub::configure() -{ - if ( !dcopClient() ) { - setStatus( CallFailed ); - return; - } - TQByteArray data; - dcopClient()->send( app(), obj(), "configure()", data ); - setStatus( CallSucceeded ); -} - -TQString KShutdownIface_stub::getStatusInfo() -{ - TQString result; - if ( !dcopClient() ) { - setStatus( CallFailed ); - return result; - } - TQByteArray data, replyData; - TQCString replyType; - if ( dcopClient()->call( app(), obj(), "getStatusInfo()", data, replyType, replyData ) ) { - if ( replyType == "TQString" ) { - TQDataStream _reply_stream( replyData, IO_ReadOnly ); - _reply_stream >> result; - setStatus( CallSucceeded ); - } else { - callFailed(); - } - } else { - callFailed(); - } - return result; -} - -void KShutdownIface_stub::makeInvisible() -{ - if ( !dcopClient() ) { - setStatus( CallFailed ); - return; - } - TQByteArray data, replyData; - TQCString replyType; - if ( dcopClient()->call( app(), obj(), "makeInvisible()", data, replyType, replyData ) ) { - setStatus( CallSucceeded ); - } else { - callFailed(); - } -} - -void KShutdownIface_stub::makeVisible() -{ - if ( !dcopClient() ) { - setStatus( CallFailed ); - return; - } - TQByteArray data; - dcopClient()->send( app(), obj(), "makeVisible()", data ); - setStatus( CallSucceeded ); -} - -void KShutdownIface_stub::setTestMode( bool arg0 ) -{ - if ( !dcopClient() ) { - setStatus( CallFailed ); - return; - } - TQByteArray data; - TQDataStream arg( data, IO_WriteOnly ); - arg << arg0; - dcopClient()->send( app(), obj(), "setTestMode(bool)", data ); - setStatus( CallSucceeded ); -} - - diff --git a/kshutdown/kshutdowniface_stub.h b/kshutdown/kshutdowniface_stub.h deleted file mode 100644 index f433424..0000000 --- a/kshutdown/kshutdowniface_stub.h +++ /dev/null @@ -1,38 +0,0 @@ -/**************************************************************************** -** -** DCOP Stub Definition created by dcopidl2cpp from kshutdowniface.kidl -** -** WARNING! All changes made in this file will be lost! -** -*****************************************************************************/ - -#ifndef __KSHUTDOWNIFACE_STUB__ -#define __KSHUTDOWNIFACE_STUB__ - -#include -#include - - -class KShutdownIface_stub : virtual public DCOPStub -{ -public: - KShutdownIface_stub( const TQCString& app, const TQCString& id ); - KShutdownIface_stub( DCOPClient* client, const TQCString& app, const TQCString& id ); - explicit KShutdownIface_stub( const DCOPRef& ref ); - virtual ASYNC cancel(); - virtual bool shutDown(); - virtual bool shutdown(); - virtual bool reboot(); - virtual bool lockScreen(); - virtual bool logout(); - virtual ASYNC configure(); - virtual TQString getStatusInfo(); - virtual void makeInvisible(); - virtual ASYNC makeVisible(); - virtual ASYNC setTestMode( bool yes ); -protected: - KShutdownIface_stub() : DCOPStub( never_use ) {}; -}; - - -#endif