kappdcopiface_skel.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "./kappdcopiface.h"
00010
00011 #include <kdatastream.h>
00012
00013
00014 static const char* const KAppDCOPInterface_ftable[5][3] = {
00015 { "void", "disableSessionManagement()", "disableSessionManagement()" },
00016 { "QCString", "startupId()", "startupId()" },
00017 { "QCString", "caption()", "caption()" },
00018 { "void", "quit()", "quit()" },
00019 { 0, 0, 0 }
00020 };
00021 static const int KAppDCOPInterface_ftable_hiddens[4] = {
00022 0,
00023 0,
00024 0,
00025 0,
00026 };
00027
00028 bool KAppDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00029 {
00030 if ( fun == KAppDCOPInterface_ftable[0][1] ) {
00031 replyType = KAppDCOPInterface_ftable[0][0];
00032 disableSessionManagement( );
00033 } else if ( fun == KAppDCOPInterface_ftable[1][1] ) {
00034 replyType = KAppDCOPInterface_ftable[1][0];
00035 QDataStream _replyStream( replyData, IO_WriteOnly );
00036 _replyStream << startupId( );
00037 } else if ( fun == KAppDCOPInterface_ftable[2][1] ) {
00038 replyType = KAppDCOPInterface_ftable[2][0];
00039 QDataStream _replyStream( replyData, IO_WriteOnly );
00040 _replyStream << caption( );
00041 } else if ( fun == KAppDCOPInterface_ftable[3][1] ) {
00042 replyType = KAppDCOPInterface_ftable[3][0];
00043 quit( );
00044 } else {
00045 return DCOPObject::process( fun, data, replyType, replyData );
00046 }
00047 return true;
00048 }
00049
00050 QCStringList KAppDCOPInterface::interfaces()
00051 {
00052 QCStringList ifaces = DCOPObject::interfaces();
00053 ifaces += "KAppDCOPInterface";
00054 return ifaces;
00055 }
00056
00057 QCStringList KAppDCOPInterface::functions()
00058 {
00059 QCStringList funcs = DCOPObject::functions();
00060 for ( int i = 0; KAppDCOPInterface_ftable[i][2]; i++ ) {
00061 if (KAppDCOPInterface_ftable_hiddens[i])
00062 continue;
00063 QCString func = KAppDCOPInterface_ftable[i][0];
00064 func += ' ';
00065 func += KAppDCOPInterface_ftable[i][2];
00066 funcs << func;
00067 }
00068 return funcs;
00069 }
00070
00071
This file is part of the documentation for kdecore Library Version 3.2.0.