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
00022 bool KAppDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00023 {
00024 if ( fun == KAppDCOPInterface_ftable[0][1] ) {
00025 replyType = KAppDCOPInterface_ftable[0][0];
00026 disableSessionManagement( );
00027 } else if ( fun == KAppDCOPInterface_ftable[1][1] ) {
00028 replyType = KAppDCOPInterface_ftable[1][0];
00029 QDataStream _replyStream( replyData, IO_WriteOnly );
00030 _replyStream << startupId( );
00031 } else if ( fun == KAppDCOPInterface_ftable[2][1] ) {
00032 replyType = KAppDCOPInterface_ftable[2][0];
00033 QDataStream _replyStream( replyData, IO_WriteOnly );
00034 _replyStream << caption( );
00035 } else if ( fun == KAppDCOPInterface_ftable[3][1] ) {
00036 replyType = KAppDCOPInterface_ftable[3][0];
00037 quit( );
00038 } else {
00039 return DCOPObject::process( fun, data, replyType, replyData );
00040 }
00041 return TRUE;
00042 }
00043
00044 QCStringList KAppDCOPInterface::interfaces()
00045 {
00046 QCStringList ifaces = DCOPObject::interfaces();
00047 ifaces += "KAppDCOPInterface";
00048 return ifaces;
00049 }
00050
00051 QCStringList KAppDCOPInterface::functions()
00052 {
00053 QCStringList funcs = DCOPObject::functions();
00054 for ( int i = 0; KAppDCOPInterface_ftable[i][2]; i++ ) {
00055 QCString func = KAppDCOPInterface_ftable[i][0];
00056 func += ' ';
00057 func += KAppDCOPInterface_ftable[i][2];
00058 funcs << func;
00059 }
00060 return funcs;
00061 }
00062
00063
This file is part of the documentation for kdelibs Version 3.1.4.