Signed-off-by: gregory guy <gregory-tde@laposte.net>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 3e18badde4
)
r14.0.x
parent
b3fcd90291
commit
8fb3db7b2c
@ -1,53 +0,0 @@
|
||||
<!DOCTYPE DCOP-IDL><DCOP-IDL>
|
||||
<SOURCE>kshutdowniface.h</SOURCE>
|
||||
<INCLUDE>dcopobject.h</INCLUDE>
|
||||
<CLASS>
|
||||
<NAME>KShutdownIface</NAME>
|
||||
<SUPER>DCOPObject</SUPER>
|
||||
<FUNC>
|
||||
<TYPE>ASYNC</TYPE>
|
||||
<NAME>cancel</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>bool</TYPE>
|
||||
<NAME>shutDown</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>bool</TYPE>
|
||||
<NAME>shutdown</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>bool</TYPE>
|
||||
<NAME>reboot</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>bool</TYPE>
|
||||
<NAME>lockScreen</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>bool</TYPE>
|
||||
<NAME>logout</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>ASYNC</TYPE>
|
||||
<NAME>configure</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>QString</TYPE>
|
||||
<NAME>getStatusInfo</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>void</TYPE>
|
||||
<NAME>makeInvisible</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>ASYNC</TYPE>
|
||||
<NAME>makeVisible</NAME>
|
||||
</FUNC>
|
||||
<FUNC>
|
||||
<TYPE>ASYNC</TYPE>
|
||||
<NAME>setTestMode</NAME>
|
||||
<ARG><TYPE>bool</TYPE><NAME>yes</NAME></ARG>
|
||||
</FUNC>
|
||||
</CLASS>
|
||||
</DCOP-IDL>
|
@ -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 <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;
|
||||
}
|
||||
|
||||
|
@ -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 <dcopclient.h>
|
||||
|
||||
#include <kdatastream.h>
|
||||
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
@ -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 <dcopstub.h>
|
||||
#include <dcopobject.h>
|
||||
|
||||
|
||||
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
|
Loading…
Reference in new issue